var name, country : string
var filevar : int
var holdit : string (1)
open : filevar, "a:/animal", put
for counter : 1 .. 2
put "Please enter name of the #" ,counter, " animal followed by country "..
get name, country
end for
close : filevar
put ""
open : filevar, "a:/animal", get
put "This is the display for all the animals and countries."
put "When you are ready press Enter to get contents "
put "of the file.."
getch (holdit)
cls
for counter : 1 .. 2
get : filevar, name, country
put "Animal= ", name, " Country= ", country
end for
close : filevar
|