-Collapse +Expand
Message Boards
Tech Search:

Advanced
More Board Options
MOREINFO...
My Moderator Settings
MODERATOROPTONS

BOARDSTATS
Posts: 16698
Threads: 5340
Topics: 95
Boards: 34
Groups: 34
 

Prestwood eMagazine

February Edition
Subscribe now! It's Free!
Enter your email:

   ► MB Lobby ►   Print This     

How use variable Posts

"How use variable" Knowledge Base Posts

More...
  KB Article    

Mike Prestwood
1. Perl Variables ($x = 0;)

Perl is a loosely typed language with only three types of variables: scalars, arrays, and hashes. Use $ for a scalar variable, @ for an array, or % for a hash (an associative array). The scalar variable type is used for anytype of simple data such as strings, integers, and numbers. In Perl, you identify and use a variable with a $ even within strings

Posted to KB Topic: Beginners Corner
18 years ago, and updated 16 years ago

Code

KB Post
Nothing New Since Your Last Visit
15905
Hits

Perl

Mike Prestwood
2. ObjectPAL Variables (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.

Declare local variables within a method. If you want a local static variable (retains it's value because it is not destroyed), declare the varialbes above the method. Variables declared in an object's Var window are visible to all methods attached to that object, and objects that it contains.

Posted to KB Topic: OPAL: Language Basics
18 years ago, and updated 16 years ago
(2 Comments , last by Jesse.L )

Code
Nothing New Since Your Last Visit  
16664
Hits

Corel Paradox / ObjectPAL Coding

Mike Prestwood
3. ObjectPAL Code Blocks (endXxxx)

ObjectPAL code blocks are surrounded by statement ending keywords that all use End with camel caps such as endMethod, endVar, endIf, endSwitch, and endTry.

Posted to KB Topic: OPAL: Language Basics
18 years ago, and updated 17 years ago

Code
Nothing New Since Your Last Visit
9293
Hits

Corel Paradox / ObjectPAL Coding

Mike Prestwood
4. Delphi Prism Pointers

Although pointer data types in Prism coding are less important than in other languages such as C++, Prism does support developer defined pointers. Use the ^ operator to declare a pointer data type. Use the @ operator to return the current address of a variable.

In .Net managed coding the use of pointers is not safe because the garbage collector may move memory around. To safely use pointers, use the unsafe keyword. However, avoid unsafe code if possible.

Posted to KB Topic: Language Details
17 years ago
(2 Comments , last by Robert.V2 )

Code
Nothing New Since Your Last Visit
15353
Hits

Delphi Prism

Mike Prestwood
5. VB.Net Pointers (None)

VB.Net doesn't support pointers. The closest it comes is IntPtr which you use to get pointer handles on windows, files, etc.

C# does have better support for pointers and C++/CLI has extensive support. One solution when it's really needed in VB.Net is to code in C# or C++/CLI and add it to your project.

However, VB.Net does support references.

Posted to KB Topic: Language Details
17 years ago
(1 Comments , last by James.L2 )

Code
Nothing New Since Your Last Visit  
12180
Hits

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


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