Delphi goto语句用法


本文整理自网络,侵删。

 
program ExitLoop;
{$APPTYPE CONSOLE}
label
  CN;
begin
  for var i:=1 to 10 do
    begin
      for var l:=1 to 10 do
        begin
          Writeln(i, ',' , l);
          if (i = 5) and (l = 5) then
            goto CN; // goto 
        end;
    end;
  CN:
  Writeln('Done.');
  Readln;
end.

相关阅读 >>

Delphi产生不重复随机数的算法

Delphi 调试ios时出现 please specify exact device preset uuid

Delphi inputbox 输入时显示*号

Delphi用mapfileandchecksum 函数检测 exe 或 dll 是否被修改

Delphi bytestofile

Delphi 用ado从文本文件中导入数据库的两种方法比较

Delphi 全局钩子锁定键盘

Delphi 判断目录是否有写入权限

Delphi 2009 新增单元 character isletter、isupper、islower、isdigit、isnumber

Delphi httpencode

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...