SCHMIDT@SUMEX-AIM.STANFORD.EDU (Christopher Schmidt) (12/03/87)
Does PRINTNUM work? I am just trying to use it for the first time, and am
getting very odd results. For instance, if I try the following example
straight from the InterLisp-D manual, I get the following weird results:
1<-- (PRINTNUM '(FLOAT 7 2 NIL NIL 1) 27.689)
30.0027.689
The manual says I should get:
30.00
Am I doing something wrong? [...]
The first five characters ("30.00") are the effect of invoking PRINTNUM;
the last six ("27.689") are the result of the form printed by the exec.
Try (PRINTNUM '(FLOAT 7 2 NIL NIL 1) 27.689 (CREATEW)) to segregate output.
--Christopher
-------gandalf@russell.STANFORD.EDU (Juergen Wagner) (12/03/87)
Sorry, I reckon you will get a zillion of responses. I assume, you did that example last night (morning) after 24 hours work. Of course, you get (PRINTNUM '(FLOAT 7 2 () () 1) 27.689) ==> 30.0027.689 Try (PROGN (PRINTNUM '(FLOAT 7 2 () () 1) 27.689) (TERPRI)) You will get ==> 30.00 NIL The 27.689 are just the result of your function call (it is supposed to return a value. The value is your number. Sorry, I couldn't resist. --Juergen Wagner (gandalf@Russell.Stanford.edu)