Constants are data units with fixed values; their value never change while program running.

Format of constants sligthly different depending their data type.

This example demonstrate defining and usage of basic constants.





   // String constants are strings enclosed by quotation marks ( "",'',[] )
   ? "String :", "This is a string" 

   // Numeric constants are strings of digits, decimal point (.)
   // and sign mark (+/-)
   ? "Numeric :", -123.56  

   // Logical constants are T or F enclosed by "." 
   ? "Logical :", .T. 

   // String constant converted to date type by CTOD() function
   ? "Date :", CTOD( "23.04.2012" ) 

RETURN // Main()

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.