Types in Structured Text

<< Click to Display Table of Contents >>

Navigation:  Project > Scripts > ST language >

Types in Structured Text

Previous pageReturn to chapter overviewNext page

Data types of Structured Text are similar to data types of TeslaSCADA2:

 

Data Type

Format

Range

bool

Boolean

FALSE(0)/TRUE(1)

byte

Byte

-128 … 127

short

Short

-32768 … 32767

int

Integer

-2^31 … 2^31-1

long

Long Integer

-2^63 … 2^63-1

float

Float

±3.40282347E+38F

double

Double

±1.79769313E+308

string

Character string

“My string”

array

Array

byte[], short[], int[], float[]

 

Examples of variable initialisation:

bool x=false;

byte b = 2;

short s = 45;

int i = -4546;

long l = 394394832;

float f = 1.23;

double d = -545.64;

string str = “Hello”;

byte bytes[10] = [1,2,3,4,5,6,7,8,9,10];