Jeff Clites <[EMAIL PROTECTED]> wrote: > My main point is that you can't do conditional library loading. This > code will try to load the "doesnt_exist" library, and I don't think it > should:
> branch HERE > loadlib P1, "doesnt_exist" > HERE: > end > It's not because the branch fails--it's because the library is loaded > before the script starts running. It depends. When you run it immediately, you are right: The library is loaded at compile time. When you compile it as .pbc and run it, the lib isn't loaded ar runtime. *But*, when writing that stuff, one prelim was, that the compiler sees all libs in the same sequence as runtime does. So above code (or your second example) is illegal. > dynclasses/dynfoo.pasm is the example I was referring to. It actually > works for me also--if I leave the code in imcc/parser_util.c which > causes the parse-time library loading mentioned above. (I had commented > that out.) The parser needs the information, that the lib provides, e.g. the classname. We could have a new P0, "className" too, of course, where everything happens at runtime and the parser doesn't know anything about that class. > This brings me back to my original question of whether the parser > should think ".Foo" is a macro at all, or if rather that's not legal > macro syntax. This doesn't change the problem per se. > JEff leo