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 GuidesVB.Net  Print This     

If Statement (VB.Net and Delphi Prism Cross Reference Guide)

By Mike Prestwood

VB.Net versus Delphi Prism: A side by side comparison between VB.Net and Delphi Prism.

 
Statements
 

Common statements such as if statements, loops, etc.

If Statement

[Other Languages] 
VB.Net:   If..ElseIf..Else..End If

Same as VB classic.

Syntax Example:  
If x Then
MessageBox.Show("hello")
ElseIf Not x Then
MessageBox.Show("goodbye")
Else
MessageBox.Show("what?")
End If
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');
end
Else If y = 'Mike' Then 
  ShowMessage('hello mike')
Else 
  ShowMessage('last option');












Sales Website: www.prestwood.com Or visit our legacy sales site: 
legacy.prestwood.com


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