programming tools for Windows applications development
  Home  |   SwiftForth Archive  |   SwiftX Archive  |

Re: argc & argv

From: Carlos Vergara <chv60_at_hotmail.com>
Date: Sun, 30 Nov 2003 02:43:03 -0500 (Hora est. Or. (EE.UU. y Canadá))

Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
=0D
Hi,=0D
=0D
Jeff, thank you for your code. It guided me to start.f where there are t=
he
words cmdline, argc, argv and others.=0D
=0D
I found that on startup SwiftForth interprets the command line which wind=
ows
passes to it. It means to me that forth will take the first argument and
try to execute it. Then, I wrote a word go which should take the command
line and show the arguments:=0D
=0D
    : go ( -- )=0D
     cmdline argc 0 ?do=0D
      cmdline i argv type cr=0D
     loop=0D
    \ bye=0D
     ;=0D
=0D
    PROGRAM cmdline.exe=0D
=0D
If it works it means that I can work with the command line, which is what=
 I
want. =0D
=0D
To test it we can write something like=0D
    cmdline go one two three four=0D
in a dos box, which would type the lines go, one, two, three and four. A=
nd
it did, but in a SwiftForth window.=0D
=0D
Now, I don't want it to open the Forth window but to emit directly in the
dos window I called the program from. Is it possible? If I use the dosb=
ox
package it will open a different dos box than the one I used to call the
program, but also the SwiftForth box. I don't want the new dos box neith=
er
the SwiftForth box. How can I do it?=0D
=0D
Regards,=0D
=0D
Carlos Vergara

-- Binary/unsupported file stripped by Ecartis --
-- Type: image/gif
-- File: IMSTP.gif

----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and bug
reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Sat Nov 29 2003 - 23:51:04 PST

This archive was generated by hypermail 2.2.0 : Tue Dec 02 2008 - 03:04:34 PST