|
![]() |
||||||||||||||
Primitive Data Types TutorialPrimitive Data TypesPrimitive types are Integer, Float, String and Bool. Integer and float literal constants have the similar syntax as in programming language C. Float literals must contain decimal point and at least one digit before it. Logical literal constants are true and false. String literals are quoted by single or double quotes. Special characters are specified by escape sequences, like in programming language C. Most important escape sequences are: single quote (\'), double quote (\"), backslash (\\), new line (\n), carriage return (\r), horizontal tab (\t), vertical tab (\v), form feed (\f) and backspace (\b). Source code:{# 0, 42, -21, 3.4, 0., 1.2e-3, true || false, 'abc' + "def" #} Result:{# 0, 42, -21, 3.400000, 0.000000, 0.001200, true, "abcdef" #}
|
|
||||||||||||||
© 2006 Saša Malkov | |||||||||||||||