You are here: Core Reference > Coding > Logic > Default Values for Built-in Data Types (Literals)

Default Values for Built-in Data Types (Literals)

The format for entering default values for integer, real, bit, string, time, and date and time variables is:

Example:

The following example shows how default values can be set for a variety of built-in data types:

  • VAR
    • a: INT:= 535;
    • d: DATE:= D#2004-06-21;
    • t: TIME_OF_DAY:= TOD#12:30:07;
    • n: TIME:= T#1h30m;
    • p: ARRAY[1..4] OF INT:= [10,90,12,14];
    • q: ARRAY[1..100] OF REAL:= [100(20.5)];
  • END_VAR;

NOTE: The default value for the q variable sets 100 array values to have a default value of 20.5.


ClearSCADA 2015 R2