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: Bernd Paysan
Subject: Re: [gforth] How do I access the program name / argv[0] in Forth?
Date: Sat, 06 Oct 2012 19:47:55 +0200
User-agent: KMail/4.8.5 (Linux/3.4.6-2.10-desktop; KDE/4.8.5; x86_64; ; )

Am Samstag, 6. Oktober 2012, 13:43:23 schrieb Andrew Pennebaker:
> > `0 arg` or `argv @ @ cstring>string` both give "gforth" on my system...
> 
> Ah, that's better!
> 
> How could I reliably access the program name if the user decides to pass
> some options to gforth before supplying the source code file name?

Suggestion 1: With '0 arg'. 
Suggestion 2: Try it.  It's Forth.  You are supposed to try thing before 
asking questions.

-- 
Bernd Paysan
"If you want it done right, you have to do it yourself"
http://bernd-paysan.de/

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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