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 Paradox  Print This     

Custom Routines (Corel Paradox and Java Cross Reference Guide)

By Mike Prestwood

Corel Paradox versus Java: A side by side comparison between Corel Paradox and Java.

 
Language Details
 

Language Details is kind of a catch all for stuff that didn't make it into language basics nor any other category.

Custom Routines

[Other Languages] 

Languages Focus

For non-OOP languages, a custom routine is a function, procedure, or subroutine and for pure OOP languages, a custom routine is a class method. Hybrid languages (both non-OOP and OOP) combine both.

Corel Paradox:   method, procedure

ObjectPAL is a non-OOP language (an object-based language) that offers custom methods and custom procedures. When you create a custom method, you associate it with an existing object like a button, form, or library.

When calling a custom method or procedure that has a by reference parameter (uses var), then you cannot use a literal value. this is different than in many other languages which do allow you to pass literals by reference.

Syntax Example:
method sayHello(var pName String)
 msgInfo("", "Hello " + pName)
endMethod

method add(p1 Number, p2 Number) Number
 Return p1 + p2
endMethod
Java: 

Because java is an OOP language, all custom routines belong to a specific class and are therefore referred to as methods.

All methods in Java must return something so even with procedures, you return a "void".

Syntax Example:
public void sayHello(String pName) {
  System.out.println("Hello" + pName);
}
 

public int add(int p1, int p2) {
  return p1 + p2;
}












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


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