[tpm] Subroutine arcana
arocker at vex.net
arocker at vex.net
Mon May 21 09:18:18 PDT 2007
Thanks to everyone for the help on this topic, especially Jim Graham for
the code examples. (In any discussion of programming topics, a functioning
example beats 4 aces AND a Smith & Wesson.)
My mistakes were:
1. Believing what my course notes said, without verifying them. How many
innocent minds have I corrupted?
2. Not replacing the 2nd Edition Camel with the 3rd, which did mention
nesting subroutines. (Confirmed from a CD version.)
3. Assuming that defining an anonymous subroutine would cause it to be
executed at definition time. (If you assign the result of a function to a
scalar, the function gets evaluated. An anonymous subroutine definition
looks like a function, but it just assigns the subroutine's reference to
the scalar.)
Oh well, egg is said to be good for the complexion.
More information about the toronto-pm
mailing list