Home
Main Introduction Features Constants Statements Database Objects Parser Serial-Communication Samples Misc
Statements>Conditional Statements
Caravan Business Server>Help>Statements>Conditional Statements
Syntax The If-else-endif construct can be used in Caravan script as follows.
<caravan>if <condition> </caravan>
<caravan>endif</caravan>
If . . . endif

You can place If statements inside of other conditional statements. You must end all If statements with EndIf or you will get an error message.
Text Decision structures in Caravan script are created using If-endif and if-else-endif conditional statements. You can test conditions and then, depending on the results of that test, perform different operation. The condition is usually a comparison, but it can be any expression that evaluates to a value.
Sample <HTML>
<BODY>
<caravan>
var temp
temp(val)="1"
if temp(val)="1"
"You can place any code you desire here"
endif
</caravan></BODY>
</HTML>
Back