![]() |
||
| Home | SwiftForth Archive | SwiftX Archive | |

At 04:07 PM 12/16/02 -0500, you wrote:
> > The question is.. when my turnkey opens the file "automatically" by
> > clicking on the file itself, where can my turnkey "find" the filename so it
> > can process it properly?
>
>If I am not mistaken, the program is launched as if you had typed in the
>command line "program-name file-name". You should be able to get the file
>name as the second command line argument (or argv(1) in C parlance). I
>don't have SF right in front of me here, but I think you should be able to
>get the argument without much trouble.
>
>It seems that there is an ARGC and ARGV in Swift, but they're not
>documented in the FPM or Swift User's Manual, so you'll have to
>interrogate your system source to figure out how to use them!
ARGC ( addr len -- n ) Returns the number of blank-delimited words
in the string.
ARGV ( addr1 len1 n -- addr2 len2 ) Returns the Nth word (counting
from zero) in the string addr1 len1.
Cheers,
Elizabeth
==================================================
Elizabeth D. Rather (US & Canada) 800-55-FORTH
FORTH Inc. +1 310-491-3356
5155 W. Rosecrans Ave. #1018 Fax: +1 310-978-9454
Hawthorne, CA 90250
http://www.forth.com
"Forth-based products and Services for real-time
applications since 1973."
==================================================
----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe sftalk" to listar_at_forth.com
For help with listar commands, send subject "help" to listar_at_forth.com
Archives are located at http://www.forth.com/sftalk -- check them out!
Search the archives! Visit http://www.forth.com/search for details.
Received on Mon Dec 16 2002 - 13:23:08 PST
This archive was generated by hypermail 2.2.0 : Tue Dec 02 2008 - 03:04:28 PST