VCL语法教程——2.循环及运算
- 运算符
= equal to 也可以用== , eq
<> not equal to 也可以用!=
< less than
<= less than or equal to
> greater than
>= greater than or equal to
and 也可以用&
or 也可以用|
这里注意1.=既有赋值也有比较的功能
2. <> 代表不等于
3. 注意and 和 or的使用
- 条件语句if-else
if(((user1=0x12) and (user2=0x13)) or (user3<>0))
{
some code
}
else if (user5=0x23)
{
some code
}
else
{
code here
}
- while 循环
while(user=0x12)
{
code here or just empty
}
- goto 语句用于与label的跳转,见教程1
- call-return语句,用于子程序的跳转。
main:
code for first step
code for second step
call mysubscript
the last code to step
goto main:
mysubscript:
code for third step
总结:VCL不支持case语句.