File: testlineio.kbs

package info (click to toggle)
basic256 2.0.99.10-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,888 kB
  • sloc: cpp: 17,185; yacc: 4,025; lex: 1,466; java: 1,091; sh: 39; xml: 33; makefile: 20
file content (22 lines) | stat: -rw-r--r-- 306 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# testlineio.kbs - test readline, writeline, and eof
# 2008-08-29 jmr

open "foo.txt"
reset
for l = 1 to 8
	writeline "Data file line " + l + "."
next l


l = 0
donext:
if eof then goto done
l = l + 1
a$ = readline
print "line " + l + "=" + a$
goto donext

done:
print "total of " + l + " lines."
close
end