以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- Exit For 退出i循环还是j循环 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=188492) |
-- 作者:puma -- 发布时间:2023/9/22 13:13:00 -- Exit For 退出i循环还是j循环 问题:Exit For 退出i循环还是j循环 有2个循环,exit for 是退出第一个循环?还是退出所有的循环 For i As Integer = 1 To 10 For j As Integer = 1 To 10 If j = 7 Then Exit For End If Next Next
|
-- 作者:有点蓝 -- 发布时间:2023/9/22 13:31:00 -- 退出最靠近Exit的外层循环,也就是退出j循环 |