The IF statements are same for every programming language. The IF statements are same as we use in real life conversations.
IF something is true then this. The otherwise part is implied.
In Colleague Studio’s Envision Basic language, using the $IF operator you can specify the target platform(s) for which a code block is supposed to be included by the generator.
The syntax is same as any other programming language except you need to use $(dollar) sign before the IF and you need to close the if statement using $END.
$IF --add directive-- THEN --add Envision Basic statements-- $END
The $IF operator in Envision Basic has a couple of more usages.
You can check if the Operating System is a UNIX or a Windows or even a database server platform.
This is how we can check it:
- Use UNIX when generating for a platform running on UNIX OS.
- Use NT when generating for a platform running on WINDOWS oS.
- APPSERVER will return true except when generating code meant to run on the database server, for e.g. a computed column subroutine.
colleague how to if operators studio syntax