// Check file objects // definition of the file objects define object f = file define object h = file define string filename = "output1.txt" // Creation of a new file and write inside bloc newfile is call h open call h write "write wihtout " call h write "new line, " call h writeline "now with new line" call h write "write after new line, " call h writeline "second new line" //Tests writetab call h writetab "test_tab" call h writetab "test_tab2" call h writetab "test_tab3" call h close end // newfile bloc appendfile is call f append call f writeline "continuing file..." call f close end bloc existfile is if (exist(filename) == 1) then print filename "exists" else print filename "doesn't exist" end set h name = "output2.txt" newfile print "output2.txt created" set f name = "output2.txt" appendfile print "output2.txt continued" existfile define object k = keyboard print "test Open error (o) or append error (a) ? call k input if (string k key == "a") then set f name = "output1.txt" appendfile else set h name = "output2.txt" newfile end quit