for_next.bas
来自「82 sample programs written in BASCOM-805」· BAS 代码 · 共 32 行
BAS
32 行
'--------------------------------------------------------------
' (c) 1997-2000 MCS Electronics
'--------------------------------------------------------------
' file: FOR_NEXT.BAS
' demo: FOR, NEXT
'--------------------------------------------------------------
Dim A As Byte , B1 As Byte , C As Integer
For A = 1 To 10 Step 2
Print "This is A " ; A
Next A
Print "Now lets try DOWNTO"
For C = 10 Downto -5
Print "This is C " ; C
Next
Print "You can also nest FOR..NEXT statements."
For A = 1 To 10
Print "This is A " ; A
For B1 = 1 To 10
Print "This is B1 " ; B1
Next ' note that you do not have to specify the parameter
Next A
End
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?