[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- To: KST at MIT-MC, GJC at MIT-MC
- From: Carl W. Hoffman <CWH at MIT-MC>
- Date: Sat, 4 Apr 81 19:12:00 GMT
- Cc: BUG-LISP at MIT-MC
- Original-date: 4 April 1981 14:12-EST
I haven't seen anybody answer this yet, so I'll give it a try. My apologies
if someone has already responded to this.
Date: 3 APR 1981 1048-EST
From: KST at MIT-MC (Kim Stefan Theilhaber)
My GRTOOL program still gets PDL-OVERFLOW's ...
Let me give the general picture. I have an s-exp of graphics
commands. X, I do (EVAL X) to print the graph. For a given X sometimes
it will PDL-OVERFLOW, and sometimes it will not. In other words,
evaluating the SAME unchanging S-EXP does not produce repeatable
results.
There is nothing much on the stack, just want you would expect
from evaluating an expession like (ARDS-SET-POINT 100 100),
for some reason the PDL-OVERFLOW happens inside +TYO.
My guess as to what is going on here is that X is a list of forms like
(SET-POINT 100 100) with a PROGN at the head of the list. [GJC later
confirms this.] Since PROGN is an LSUBR and not a special form, the pdl
will grow as each form in the list is evaluated and the graph is printed.
I'm not sure what would cause the inconsistencies in repeated evaluations
the same form. Being at a break level versus top level? GC in the middle?
A simple solution to your problem would be to use MAPC rather than applying
PROGN.
I suspect there are more efficient ways of representing your data and
drawing your graph than using lists and calling EVAL. (In general, user
programs should rarely need to call EVAL.) If you are just drawing points,
then you can use a 2 by N fixnum array to store point coordinates and
iterate over the array when drawing. Or you can make the first dimension 3
if you need an "op code" field, i.e. to distinguish between drawing a point,
drawing a line, and pen displacement.