Your full service technology partner! 
-Collapse +Expand
To/From Code
-Collapse +Expand Members-Only
Sign in to see member-only pages.
   ► KBTo/From GuidesPHP  Print This     

If Statement (PHP and Corel Paradox Cross Reference Guide)

By Mike Prestwood

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


Common statements such as if statements, loops, etc.

If Statement

[Other Languages] 
PHP:   if..elseif..else

The PHP if statement consists of using if, elseif, and else.

Syntax Example:
$x = 8;
if ($x == 10) {
 echo "x is 10."; 
} elseif ($x < 10) {
 echo "x is less than 10.";
} else {
 echo "x must be greater than 10."; 
Corel Paradox:   If..Else..EndIf, or switch

ObjectPAL supports a simple If...Else...EndIf statement.

Notice ObjectPAL does not support an ElseIf feature as part of an if statement. Instead use a switch statement

Syntax Example:  
'Does ObjectPAL evaluate the math correctly? No!
If (.1 + .1 + .1) = .3 Then
  msgInfo("", "Correct")
  msgInfo("", "Not correct")
'Switch statement example.
case x = "Nate": MsgInfo("", "Hi Nate")
case x = "Felicia": MsgInfo("", "Hi Felly")
  otherwise: MsgInfo("", "Who are you?")

Sales Website: Or visit our legacy sales site:

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