ibeautiful
2023-03-19 10:06:53
假如:#50# S3=...........(一個賦值行為)#60# for............(這里有個三重循環(huán))##三重循環(huán)結束##if ((L-1)==0):L=0goto 60··else:if (S3>S2):goto 50
2 回答
嚕嚕噠
TA貢獻1784條經(jīng)驗 獲得超7個贊
慕田峪9158850
TA貢獻1794條經(jīng)驗 獲得超8個贊
使用如下例:
1 from goto import *
2
3 @patch
4 def f2():
5 goto(10)
6 print 'should not see this'
7 label(10)
8 for i in range(1,99999):
9 print i
10 if i == 5:
11 goto('out')
12 label('out')
13
14 f2()
用法是:
1. from goto import *。注意暫時不支持import goto,不是不能實現(xiàn),是暫時沒時間寫。
2.對需要使用goto的函數(shù),前面加個@patch
3.用label(x)和goto(x)的形式寫label和goto。x可以是數(shù)字或字符串。
goto模塊的代碼如下:
goto.py
- 2 回答
- 0 關注
- 126 瀏覽
添加回答
舉報
0/150
提交
取消



