Promotic

Data types JavaScript

String Text string that can be up to approximately 2 billion characters in length in the Unicode character set.
 
Characters are enclosed in quotes or apostrophes (" or ') in the string.
Quotation marks can be in the string that is enclosed by apostrophes
and apostrophes can be in the string that is enclosed by quotation marks.
 
The string must be written on one line; it cannot be split into two lines.
If a newline character must be inserted into a text string, then the escape sequence \n can be used, which is described below.

Examples of a text string notation:
- "" // Empty string that has 0 characters
- 'Temperature'
- '3.14'
- 'Name = "Pressure"'
- 'This string has two rows.'
- "π is Ludolph's number"
- "Temperature is " + nTemperature + " °C" // The string can be added (concatenated) with a e.g. variable of type number.

Escape sequence when writing a string:
The backslash character (\) has a special purpose in a JavaScript string. This slash and another character can be used to enter a character that could not otherwise be entered.
Sequence Presented character
\t Tabulator (\u0009)
\n New row (\u000A)
\r Return Cursor (\u000D)
\' Apostrophe (\u0027)
\" Quotation marks (\u0022)
\\ Backslash (\u005C)
\uXXXX Unicode character specified by 4 hexadecimal digits XXXX


See also Pm string methods.
Numeric JavaScript sees no difference between a whole number value and a floating-point value.
All numbers in JavaScript are represented as floating-point values by the 64-bit format that is defined by the UEEE754 standard (Double type format). Mantisa has 52 bits, exponent has 11 bits and the last bit represents the sign.
It can represent large numbers up to +-1.8x10e308 and small numbers up to +-5x10e-324.

If the Number variable is to be used for exact computations with integers, then the maximum value that can be used for computation is 9 007 199 254 740 992 (approx. 9 quadrillions). Number 1 cannot be added to this number. The smalles difference between two numbers is 2. From 18 quadrillions higher it can be 4 etc. If we add 1 then the value of the variable remains unchanged because the resulting number cannot be coded and the result is therefore rounded down.

Writing the number constant:
- Decimal integer numbers are written normally, for example 0, 3, -10003.
- Hexadecimal numbers can be entered directly by preceding numbers in the proper range with 0x. For example, 0x10 in hexadecimal represents decimal 16.
- Real number is written normally with a decimal point, for example 3.14. It can also be written in exponencial form: the letter e is written after the real number, followed by a plus/minus sign and a whole number exponent, for example 7.12e+32, 2.458268e-12.


See also methods: Pm.ToNumber, Pm.IsInt, Pm.Round ...
Boolean Logical value:
true (numeric value is "nonzero", usually -1) or
false (numeric value is 0)


Object General, undefined object.

null Flag that value contains no valid data.

See also methods: Pm.IsValid.
undefined Flag indicating that value was not set.

See also methods: Pm.IsValid.
See also:
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.