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 GuidesDelphi Prism  Print This     

If Statement (Delphi Prism and Corel Paradox Cross Reference Guide)

By Mike Prestwood

Delphi Prism versus Corel Paradox: A side by side comparison between Delphi Prism and Corel Paradox.


Common statements such as if statements, loops, etc.

If Statement

[Other Languages] 
Delphi Prism:   if..else if..else

Notice in the more complete example that the semicolon for the begin..end block after end is not included. That tells the compiler something else is coming (the statement is not finished). Also note the semicolon is missing right before the final "else" statement.

Syntax Example:
//Complete example:
if x = true then begin
  ShowMessage('x is true');
Else If y = 'Mike' Then 
  ShowMessage('hello mike')
  ShowMessage('last option');
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?")

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

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