- 17
- 0
- 约1.32万字
- 约 62页
- 2017-09-23 发布于江苏
- 举报
* 一种较为系统地被解释过的自顶向下的方法 …关于GOTO语句… 例2 … for i:=1 to m do if A[i]=x then go to 1 fi; m:=m+1; A[m]:=x; go to 2; 1: wirte(i,x); 2: … … i:=1; while (A[i] ?x) ?(im) do i:=i+1; if im then m:=m+1; A[m]:=x; else write(i,x) fi; … 改变程序执行顺序 C++中的Goto语句… Goto语句,实现异常处理编程,最初也最原始的支持手段 void main(int argc, char* argv[]){ if (Call_Func1(in, param out) { // 函数调用成功,我们正常的处理 if (Call_Func2(in, param out){ // 函数调用成功,我们正常的处理 while(condition){ //do other job // 如果错误直接跳转 if (has error) goto Error; //do othe
原创力文档

文档评论(0)