File: io.yab

package info (click to toggle)
yabasic 2.715-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,332 kB
  • ctags: 1,518
  • sloc: ansic: 11,053; sh: 7,617; perl: 260; makefile: 57
file content (33 lines) | stat: -rwxr-xr-x 428 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!./yabasic

a=open("tests/io.yab","r")
while(!eof(a))
   line input #a a$
   l=l+1
wend
close a
if (l<5) exit 1

if (!open(1,"tests/io.yab")) exit 1
while(!eof(1))
  input #1 a$
wend
close 1

rem bug from 2.700
a$ = dummy$(add$)
print a$;

rem bug from 2.714 (must be last test)
if (!open(1,"nonexistent.yab")) exit 0
exit 1

end
sub dummy$(add$)
	f = open ("tests/out.dat", "w")
	print #f "tmp"
	close #f
	return ""
end sub