Your full service technology partner! 
-Collapse +Expand
Search Paradox Group:

-Collapse +Expand Paradox To/From
-Collapse +Expand Paradox Store

Prestwood eMagazine

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

   ► KBDesktop Data...Paradox & Ob...ObjectPAL Co...OPAL: Libraries   Print This     
  From the August 2009 Issue of Prestwood eMag
Paradox OPAL: Libraries:
ObjectPAL Custom Routines (method, procedure)
Posted 15 years ago on 11/16/2008 and updated 1/14/2009
Paradox Code Snippet:
 A flashcard from our Paradox Flashcards Library
 A code snippet from our Paradox Code Snippets Page


Languages Focus: Custom Routines

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.

ObjectPAL Custom Routines

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)

method add(p1 Number, p2 Number) Number
 Return p1 + p2

The following code from a button pushButton event uses the two custom methods above:

method pushButton(var eventInfo Event)
    MyName String
 MyName = "Mike"
 msgInfo("", "2+2=" + string(add(2,2)))

More Info

KB Post:  Power: Chapter 18, Reusing Code


Share a thought or comment...
Comment 1 of 1

Exactly what I was looking for, thanks!

Posted 11 years ago
Write a Comment...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.

Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1257A1
Enter key:
Code Contributed By Mike Prestwood:

Mike Prestwood is a drummer, an author, and creator of the PrestwoodBoards online community. He is the President & CEO of Prestwood IT Solutions. Prestwood IT provides Coding, Website, and Computer Tech services. Mike has authored 6 computer books and over 1,200 articles. As a drummer, he maintains and has authored 3 drum books. If you have a project you wish to discuss with Mike, you can send him a private message through his PrestwoodBoards home page or call him 9AM to 4PM PST at 916-726-5675 x205.

Visit Profile

Linked Certification Question(s)

The following are practice certification questions with answers highlighted. These questions were prepared by Mike Prestwood and are intended to stress an important aspect of this KB post. All our practice questions are intended to prepare you generally for passing any certification test as well as prepare you for professional work.


1 Intermediate Level Question

Question #1: True or False?

Custom procedures execute faster than custom methods.

  • True
  • False

  •  KB Article #101631 Counter
    Since 11/16/2008
    Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site:

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