Carminati Paolo wrote: > Try to compile the following: > > dim as byte buffer(1024) > > local > local fn ReadBytes ( bytesToRead as unsigned byte, thePtr as ptr ) > end fn > > if (fn ReadBytes ( 2, @buffer )) then beep > end > > It will crash... > Note that if the calling routine isn’t in the “if” statement, it doesn’t crash. > In other words, fn ReadBytes( 2, @buffer ) doesn’t crash and the correct error is reported. Thanks, Paolo. I filed a bug report. FWIW, a pointer to the start of the array is obtained in FB with @buffer(0). if ( fn ReadBytes( 2, @buffer(0) ) ) then beep In C, but not FB, buffer is variable that points to the start of the array. Robert P.