Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

easy if...then...else question

Status
Not open for further replies.

diamondtektips

Programmer
Nov 18, 2003
6
CA
can somebody give me a code snippet demonstrating a multiline if..then..else statement, or tell me what's wrong with the following:

if a>b then
{
statement 1
statement 2
}
else
{
statement 1
statement 2
}

i've programmed in vb before and normally to type in a multiline "then" clause i'd put { before and } after statement 1 and 2, however crystal thinks that i'm going to type in a field... how do i do this?
 
You need to have some semicolons in there.
if a>b then
{
statement 1;
statement 2;
}
else
{
statement 1;
statement 2;
}


~Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top