In comp.lang.pop, lpb@cs.bham.ac.uk (Luc Beaudoin) writes:
> Today's question is: If the two characters,37and 80, i.e., %P, occur
> successively in the string that PRINTF takes as a first or second argument,
> does PRINTF *really* call SYS_SYSPR to print the corresponding item from the
> stack (or the list). I've performed a couple of tests which suggest that it
> doesn't. One of these tests was to trace sys_syspr in the following context:
As Luc has already noted, -pr- is a variable but sys_syspr is a constant,
so mucking about with sys_syspr is pointless. But here is a little aside
guaranteed to burst a blood vessel ....
In the dim and distant past -sprintf- and -printf- used to do different
things. But things are much better now, aren't they? So your question for
today is, in the following sequence, what happens next?
: defclass wobble {};
: erase <> printf(% 'wobbler', 'I\'m a %p' %) -> class_print( wobble_key );
: conswobble() =>
** I'm a wobbler
:
: sprintf( '%p', [% conswobble() %] ) =>
<?? And Now ???>
When they've figured out what happens, a certain person might like to
write out "I will not write bad stack citizens" 100 times in the back
of their exercise book :-) [See Chapter 5 of "Pop11 Comes of Age" if
clarification is desired.]
Steve
|