On 28 Jan 2011, at 13:28, Ian Pine wrote: > > I would like to be able to do something like: > > LET a=PI > PRINT #3,HEX$(a) > > which would write an ASCII string of the form $xxxxxxxxxxxx which would be > the internal representation of the floating point value. > > In reverse, something like: > > INPUT #3,a$ > LET a=REAL(a$,0) > > would recover the original value. The second argument is the value to be > returned if the first argument is garbage or NAN. Omitting the second > argument would return an error instead.
This is something I would like too. In my BOOT i have a procedure which prints "a" given a$, but the format of the fp number is QDOS. For example a$ could be $0800040000000. Of course in QDOS there are no NANs. I'm pretty sure that my BOOT also has the reverse procedure, but either I never use it or I have not used it for along time. George _______________________________________________ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
