What is a variable

A variable is used to store information to be referenced and manipulated in a computer program. It can also be defined as a keyword used after a Subprog or a Func declaration, to define the type of arguments transmitted to the called code.

A variable takes the form it has been declared as, this can include Date, Float, Double, Decimal, Datetime, Uuident, Libelle, Char, Clbfile and Blbfile.

 

Example syntax

Variable DECLARATION1 NAME(DIMENSIONS)

Variable DECLARATION2 NAME(SIZE)(DIMENSIONS)

Variable Instance NAME Using CLASS

Variable Instance NAME(DIMENSIONS) Using CLASS

 

Example declaration

Local Char ZNAME                                      #char is used for variables of string format

Local Integer ZAGE                                     # Integer is reserved for number

Local DATE ZDATE

Global char ZGNAME

 

Next we will discuss on variable value assignment and scope of a variable.