I think I've figured out my problem. The documentation for 'cold is, at least to me, misleading. If I'm planning on using the standard gforth.fi image file, then I cannot hook into 'cold and handle command line arguments, as my file won't be loaded until after 'cold is called. And since my file is where I override 'cold, it's a moot point.

So this begs the question, how do people write forth programs that are run with gforth, using the standard gforth.fi image file, and yet handle command line arguments?

Cameron Esfahani
[EMAIL PROTECTED]

"All that is necessary for the triumph of evil is that good men do nothing."

Edmund Burke
On Jan 12, 2004, at 6:43 PM, Cameron Esfahani wrote:

I've been trying to use 'cold to handle some command line arguments, but success has been eluding me. Below is a reduced test program which hopefully shows my problem.

\ test.fth

: test-cold
        cr ." test-code called" cr
        ;

:noname
        DEFERS 'cold
        test-cold ; IS 'cold

And when I invoke this on the command line with:

gforth test.fth

I don't get any output other than the standard banner message. If I call 'cold manually, I do see my output. I've also verified via "see" that 'cold does indeed point to my anonymous routine.

This is on gforth 0.6.2. Anyone have any ideas?


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to