gforth
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gforth] How do I access the program name / argv[0] in Forth?


From: Josh Grams
Subject: Re: [gforth] How do I access the program name / argv[0] in Forth?
Date: Sat, 6 Oct 2012 11:59:09 -0400
User-agent: Mutt/1.5.18 (2008-05-17)

On 2012-10-06 09:55AM, Andrew Pennebaker wrote:
>The gforth docs say to access arguments by calling next-arg, but this omits
>the program name, which would be printed in a C-like language.
>
>Since argv[0] seems to be automatically removed from the argument vector in
>Forth, is there a special function I can call that does return it?

`0 arg` or `argv @ @ cstring>string` both give "gforth" on my system...

--Josh



reply via email to

[Prev in Thread] Current Thread [Next in Thread]