use Files

alg
begin
if not file_exists("a.txt")
then create_file("a.txt")
end_if
int r, i
open_for_write("a.txt", r)
f_print r, 5
close(r)
open_for_read("a.txt", r)
assert not end_of_file(r)
f_scan r, i
assert i=5
rewind(r)
f_scan r, i
assert i=5
close(r)
print (i=5), nl
end
