File: io.yab

package info (click to toggle)
yabasic 1%3A2.91.1-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 4,168 kB
  • sloc: ansic: 12,434; sh: 4,417; makefile: 21
file content (33 lines) | stat: -rwxr-xr-x 446 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
23
24
25
26
27
28
29
30
31
32
33
#!./yabasic

a=open(peek$("program_file_name"),"r")
while(!eof(a))
   line input #a a$
   l=l+1
wend
close a
if (l<5) exit 1

if (!open(1,peek$("program_file_name"))) 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 ("out.dat", "w")
	print #f "tmp"
	close #f
	return ""
end sub