#!/usr/pkg/bin/wsbasic

#proper use of read and data

for i=1 to 5
begin
  read nr, day
  print nr, " ", day, " ";
end


print ""
print ""

#some dirty stuff we show that if read is called too many times the last value is used...
restore
for i=1 to 9
begin
  read nr, day$
  print nr," ", day$
  if i== 6 restore #we should restore when i==5 but don't do it on purpose :)
end

data 1,"monday",2,"tuesday",3,"wednesday",4,"thursday",5,"friday"

