Wolfgang Lenerz schreef: > On 2 Apr 2006 at 9:07, François Van Emelen wrote: > (...) > >> Using 'input' can return unexpected results even without exceeding >> the input buffer length. > > Hmmm, I wonder whether this is really so unexpected. > > On my machine, this prints > > -10, 160 > > (i.e. error "end of file" at line 160)
Yes, that's the error you should get. With 'unexpected results', I mean an empty string (because there is no linefeed in the source file) where one would expect 'Dilwyn' (in my example). > followed by nothing (empty string) and 0 (length of empty string). > > You get the latter two because SMSQE will create a variable for you on the > fly if you use one that hasn't been initialized before (try to compile this > and QLIB will complain if you run it) and the variable is an empty string > because the input function returned an error, so that the variable never got > any value. Of course, once Qliberated, my example would crash if st1$ is not initialised. François Van Emelen > Wolfgang > > ---------------------------------------- > www.scp-paulet-lenerz.com > > _______________________________________________ > QL-Users Mailing List > http://www.q-v-d.demon.co.uk/smsqe.htm > > _______________________________________________ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
