Date : Sun, 03 Jul 2005 23:38:03 +0100 (BST)
From : Greg Cook <debounce@...>
Subject: This program will self destruct
A little something to clear the air...
>LIST
10 DIM B% 4
20 PROCg(1,2)
30 END
40 DEF PROCg(?B%,B%!1)
50 PRINT "This program will self destruct"
60 ENDPROC
>RUN
This program will self destruct
>RUN
Syntax error at line 20
>LIST 20
20
1,2)
>
So it's not safe to write instant-whip wrappers for the OSFILE, OSGBPB
calls etc, anything besides non-overlapping !X or X!N values has to be
assigned through "idler" variables:
40 DEF FNg(A%,B%!1)
50 LOCAL C%
60 C%=?B%
70 ?B%=A%
80 PRINT "Phew! Mission accomplished"
90 ?B%=C%
100 ENDPROC
You may know that the actual parameters of PROCs and FNs are
automatically made LOCAL but restored in reverse order, which is why
the ! fields must not overlap. But the ? operator really goes wrong.
Even this fails to do its job:
50 LOCAL ?B%
You have been warned!
Greg Cook
debounce@...
http://homepages.tesco.net/~rainstorm/
___________________________________________________________
How much free photo storage do you get? Store your holiday
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com