       10 // RANDOM file access test program
       20 //
       30 PROC deliet EXTERNAL "deliet.sq"
       40 deliet("ofile7")
       50 //
       60 OPEN FILE 1, "ofile7", RANDOM 18
       70 FOR f#:=1 TO 5 DO PRINT FILE 1,f#: 2*f#,2*f#+1
       80 CLOSE FILE 1
       90 //
      100 OPEN FILE 1, "ofile7", RANDOM 2 READ ONLY  // Record size too small.
      110 //
      120 expected:=FALSE
      130 TRAP
      140   PRINT FILE 1,1: 42  // Doesn't fit.
      150   SYS assert, FALSE  // We should not get here.
      160 HANDLER
      170   expected:=TRUE  // Instead, we should get here.
      180 ENDTRAP
      190 //
      200 SYS assert, expected=TRUE
      210 //
      220 expected:=FALSE
      230 TRAP
      240   INPUT FILE 1,1: num#  // Record overflow.
      250   SYS assert, FALSE
      260 HANDLER
      270   expected:=TRUE
      280 ENDTRAP
      290 //
      300 SYS assert, expected=TRUE
      310 //
      320 CLOSE
      330 deliet("ofile7")
      340 PRINT "Ok"
