用的是软件手册里面的示例代码,居然也出错了,大家知道是什么原因不,恳请帮我看看啊!
new
def setup
a_size = 20
IO_READ = 0
IO_WRITE = 1
IO_FISH = 0
IO_ASCII = 1
filename = 'junk.txt'
end
setup
;
def io
array aa(a_size) bb(a_size)
;
; ASCII I/O TEST ------------------
status = open(filename, IO_WRITE, IO_ASCII)
aa(1) = 'Line 1 ... Fred'
aa(2) = 'Line 2 ... Joe'
aa(3) = 'Line 3 ... Roger'
status = write(aa,3)
status = close
status = open(filename, IO_READ, IO_ASCII)
status = read(bb, 3)
if statu s # 3 then
oo = out(' Bad number of lines')
endif
status = close
;
end
;
io ;调用IO测试
每次到读取的时候就出错了 Bad number of lines,说行错了