[ADD] input and output tests
This commit is contained in:
parent
5306105102
commit
7344cc6830
|
@ -4,6 +4,8 @@ println(s)
|
|||
|
||||
stream = open("elements.txt","r")
|
||||
|
||||
println(supertype(IOStream))
|
||||
|
||||
line = readline(stream)
|
||||
|
||||
println(line)
|
||||
|
@ -21,6 +23,14 @@ println(read(stream, Int8))
|
|||
|
||||
println(readstring(stream))
|
||||
|
||||
println(eof(stream))
|
||||
|
||||
close(stream)
|
||||
|
||||
open(readlines,"elements.txt")
|
||||
|
||||
#@edit readstring("elements.txt")
|
||||
|
||||
myread(s::IOStream) = read(s,Char)
|
||||
|
||||
println(open(myread,"elements.txt"))
|
||||
|
@ -46,4 +56,5 @@ open("alpha.txt", "w") do io
|
|||
for ch in 'A':'Z'
|
||||
write(io, ch)
|
||||
end
|
||||
write(io,"\n")
|
||||
end
|
Loading…
Reference in New Issue