Page 1 of 1

DATA declaration

Posted: Tue Nov 21, 2006 2:18 am
by Gilbert
Hi All,

Can someone tell me the difference between:

DATA nValue AS NUMERIC

and:

DATA nValue

Also, if I want to declare a DATA variable and initialize it at declaration.
Can I use:

DATA nValue INIT 0

or I must use:

DATA nValue AS NUMERIC INIT 0



Regards,

Posted: Tue Nov 21, 2006 8:12 am
by Antonio Linares
Gilbert,

> DATA nValue AS NUMERIC

The DATA can only hold a number value.

> DATA nValue

The DATA can hold any type value.

> DATA nValue INIT 0

The DATA can hold any type and it will be initialized with zero.

> DATA nValue AS NUMERIC INIT 0

The DATA can only hold a number and it will be initalized with zero.

Posted: Tue Nov 21, 2006 2:31 pm
by Gilbert
Hi Antonio,


Thanks for the clarifications.



Regards