dim info$( 50, 50) ' NB pre-dimension before calling file-exists ' needed for file-exists function open "test.dat" for output as #1 'create file for i = 1 to 10000 #1 chr$( int( 256 *rnd( 1))); next close #1 call truncateFile, "test.dat", 5000 wait sub truncateFile fn$, length if fileExists( DefaultDir$, fn$) =0 then notice "No such file": exit sub open fn$ for input as #i file$ =input$( #i, lof( #i)) if len( file$)