3. Statements : OpenROAD Language Statements : Assignment Statement : Examples—Assignment Statement
 
Share this page                  
Examples—Assignment Statement
Assign given values to the name and empnum simple variables:
name = 'John';
empnum = 35;
Assign specified values to the columns name and age in the second row of the dynamic array named child:
child[2].name = 'Sally';
child[2].age = 8;
Place the specified values in the name and age columns in the current row of the table field named child:
child[].name = 'Steven';
child[].age = 11;
Assign values to the city attribute of the address and address2 reference variables:
address.City = 'New York';
address2.City = 'Paris';
Reassign the reference variable, address2, to point to the same object as address. Now the city attribute for address2 is the same as that of address:
address2 = address;
currcity = address2.City;
/* Assignment is 'New York' */