In ODL, you must explicitly declare all variables before you use them in code, and their declaration must precede any code statements.
You initialize variables when either when you declare them or later on in the code. However, when you declare and initialize a variable on the same line, you can only initialize it to a constant (first bullet below). When you initialize the variable on a separate line, you can use any of the three methods shown below.
Set the variable equal to a constant.
var_name = 100;
Set the variable equal to another variable.
var_name = myvar;
Set the variable equal to an expression.
var_name = myvar + yourvar;
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |