3. Statements : OpenROAD Language Statements : Assignment Statement : Simple Assignment Statements
 
Share this page                  
Simple Assignment Statements
A simple assignment statement assigns the value of an expression to a simple variable, that is, a variable that represents a single data value. A simple variable can be:
A scalar variable. For example:
service_fee = 5.50;
An individual attribute of a reference variable. For example:
newcustomer.Name = 'Jones';
An individual data value in an array. For example:
client[4].Address = '4307 Olive St';
If the variable is associated with a field, OpenROAD displays the new value on the frame when the event block completes.
If you assign a character string to a variable that is shorter than the string, OpenROAD truncates the string. Any value that you assign to any other base data type must fall within the allowable range for the data type or OpenROAD will issue an error.