主题:[原创]可添加语句的程序
20
OPEN "zncx.bas" FOR INPUT AS #1
INPUT #1, sl
DIM a$(sl + 3)
FOR a = 1 TO sl
LINE INPUT #1, a$(a)
NEXT a
CLOSE #1
FOR a = sl + 3 TO sl - 2 STEP -1
a$(a) = a$(a - 3)
NEXT a
a$(sl - 5) = "for a=1 to 100"
a$(sl - 4) = "next a"
a$(sl - 3) = "print sl+3"
OPEN "zncx.bas" FOR OUTPUT AS #1
PRINT #1, sl + 3
FOR a = 1 TO sl + 3
PRINT #1, a$(a)
NEXT a
CLOSE #1
CHAIN "zncx.bas"
OPEN "zncx.bas" FOR INPUT AS #1
INPUT #1, sl
DIM a$(sl + 3)
FOR a = 1 TO sl
LINE INPUT #1, a$(a)
NEXT a
CLOSE #1
FOR a = sl + 3 TO sl - 2 STEP -1
a$(a) = a$(a - 3)
NEXT a
a$(sl - 5) = "for a=1 to 100"
a$(sl - 4) = "next a"
a$(sl - 3) = "print sl+3"
OPEN "zncx.bas" FOR OUTPUT AS #1
PRINT #1, sl + 3
FOR a = 1 TO sl + 3
PRINT #1, a$(a)
NEXT a
CLOSE #1
CHAIN "zncx.bas"