WinGammon@... wrote: > Are we still using on error end, on error return and on error? 'on error end' is the recommended way to trap errors from file operations. It prevents the dreaded FB file alerts. dim as OSStatus err on error end // no alerts, thanks error = _noErr // set default result code ...perform file action here err = error // retrieve result code long if ( err ) stop "Oops, error " + str$( err ) " occurred" xelse ...OK end if Here, for example, is FBtoC's internal function for reading the contents of a file into a buffer. local mode local fn SafeReadFile( fbFileNum as short, dataLoc as ptr, bytes as long ) '~'1 dim as OSStatus err err = _paramErr if ( fbFileNum < 1 or fbFileNum > 255 or bytes < 0 or dataLoc == 0 ) then exit fn on error end error = _noErr read file #fbFileNum, dataLoc, bytes err = error end fn = err Robert P.