IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
To/From Code
-Collapse +Expand Cross Ref Guide
-Collapse +Expand Members-Only
Sign in to see member-only pages.
   ► KBTo/From GuidesCorel ParadoxLanguage Details  Print This     

Variables (Cross Ref > Language Details)

By Mike Prestwood

Corel Paradox versus C++: A side by side comparison between Corel Paradox and C++.

 
Language Basics
 

Language basics is kind of a catch all for absolute beginner stuff. The items (common names) I chose for language basics is a bit random and include items like case sensitivity, commenting, declaring variables, etc.

Variables

[Other Languages] 

Languages Focus

A variable holds a value that you can use and change throughout your code so long as the variable is within scope. With variable declaration, you not only want to know the syntax of how you declare a variable but you also want to know where. Are you allowed to declare a variable inline? What are the available scopes: local vs. global. Can you assign a value at the same time you declare a variable?

Corel Paradox:   var x SmallInt endVar

Declaring variables is optional unless you click Program | Compiler Warnings while in the ObjectPAL editor for every form, script, and library you create. Using Compiler Warnings is strongly recommended to avoid incorrectly typing an existing variable and to avoid any confusion about variable scope. Also recommended is turning on Compile with Debug for every form, script, and library too for tighter, cleaner code.

Undeclared variables are AnyType variables. Common data types include Currency, Date, Datetime, Logical, LongInt, Number, SmallInt, String, and Time.

Syntax Example:
var
    FullName String
    Age SmallInt
    Weight Number
endVar
 
FullName = "Mike Prestwood"
Age = 32
Weight =154.4
msgInfo("", FullName + ", age=" + String(Age) 
             + ", weight=" + String(Weight))
C++:   int x=0;

Variable names are case sensitive.

The fundamental variable types in C++ are char, short int, int, long int, bool, float, double, long double, and wchar_t. The integer data types char, short, long and int can be either signed or unsigned. Signed variables are positive and negative. Unsigned variables are positive only.

Syntax Example:

C++, Java, and C# all use C-like variable declaration.

int Age;
int Age = 43;
float a, b, c;
string FullName; //#include 
unsigned short int FamilyMemberCount;












Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site: 
www.prestwood.com


©1995-2024 Prestwood IT Solutions.   [Security & Privacy]