Re: Win32LIb/Llama Status

new topic     » goto parent     » topic index » view thread      » older message » newer message

>On Fri, 25 Jun 1999, Roderick Jackson wrote:
>
>] >IMHO, it's a perfect argument for including and appending to an internal
>] >routine_id() table for the interpreter.
>]
>] Hmmm... might work. But we'd still need the routine_id token as well,
>] otherwise you couldn't get one on the fly:
>]
>]    sequence RoutineName
>]
>]    puts (1, "Enter procedure name to execute: ")
>]    gets (RoutineName)
>]
>]    exec_procedure (routine_id (RoutineName), {})
>]
>]    RoutineName = GetInternalRoutine () -- determines another routine to use
>]
>]    exec_procedure (routine_id ("BuiltIn" & RoutineName), {})
>
>I hadn't thought of using routine_id() like that. Maybe because asking a
>user for a subroutine name seems insecure. One good/bad guess and the
>system goes belly-up.

I would never put it in public code myself; but I've used it for
debugging purposes before.

>The other idea is a good one, but for things like that, you should be
>developing your own sequence/table of ids like so:

<snip>

>IMHO, using anything but straight strings in routine_id() calls is bad
>programming practice. YMMV OC. :)

Well, I had originally planned on constructing routine names in Quartz...
until I discovered that routine_id is purposefully restricted from
accepting routine names ahead of it in source code, even at runtime. It
would have actually made things quite a bit cleaner, though. Granted,
it's probably a rare case, but it's also an example where maintaining a
table would have just made things more cumbersome. I guess it's kind of
like the obscure case where using 'goto' is actually *helpful*.

Um, by the way... what is YMMV OC??


Rod Jackson

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu