给程序自动加上行号的小程序
DIM a$(999)
i=1
INPUT "input SOURCE filename:";source$
INPUT "input TARGET filename:";target$
OPEN source$ FOR INPUT AS #1
OPEN target$ FOR APPEND AS #2
DO WHILE NOT EOF(1)
LINE INPUT #1,a$(i)
b$=STR$(i)+SPACE$(2)+a$(i)
PRINT #2,b$
i=i+1
LOOP
CLOSE