首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > PB >

nextlast

2012-12-17 
求助:nextlast:今天在PB中看到这样的写法:nextlast:请问这是什么意思啊?谢谢。[最优解释]Example 1This GOT

求助:nextlast:
今天在PB中看到这样的写法:
nextlast:

请问这是什么意思啊?
谢谢。
[最优解释]
Example 1  This GOTO statement skips over the Taxable=FALSE line:

Goto NextStep

Taxable=FALSE     //This statement never executes.

NextStep:

Rate=Count/Count4
[其他解释]
It is label, same as SQL Server's label.
[其他解释]
与goto配合使用,有goto就要有相应的 label:
有 label: 就要有 goto
如:
int i = 0

if isnull(a) then
    goto label
end if
i ++
label:
i ++
messagebox("", i)


当代码正常往下走,遇到goto语句时,立即跳到goto后面的label处继续走。
没有借助goto,而是正常碰到 label 的时候,也会继续运行label后的代码。
如上例子,如果 isnull(a)成立,则 messagebox出来的i值为1;如果isnull(a)不成立,则仍然会messagebox,且messagebox出来的i值为2
[其他解释]
label


go to 
[其他解释]
你说的是goto 语句?
[其他解释]
谢谢大家

热点排行