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: Thu, 11 Oct 2012 12:16:29 +0200
User-agent: K-9 Mail for Android




Andrew Pennebaker <address@hidden> schrieb:

>> Ah, the name of the current source file is always 'sourcefilename'. 
>No
>> matter
>> where in the command line it is - or if it is a command line at all.
>>
>
>That's weird, on my computer, sourcefilename doesn't return the
>filename at
>all. It returns the number 13:
>
>Code:
>
>https://github.com/mcandre/scriptname/blob/master/scriptname.fs
>
>Trace:
>
>$ ./scriptname.fs
>Program: 13

It's an addr len string. Try type instead. 
-- 
Bernd Paysan
《想妥当做,亲自出马 》
http://bernd-paysan.de/



reply via email to

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