home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!Germany.EU.net!unido!sbsvax!sbustd!tobl
- From: tobl@sbustd.rz.uni-sb.de (Tobias Blickle)
- Newsgroups: comp.sys.atari.st
- Subject: Re: Passing parameters?????? 8^)
- Message-ID: <20430@sbsvax.cs.uni-sb.de>
- Date: 31 Jul 92 06:21:34 GMT
- References: <1992Jul28.114232.3549@arizona.edu>
- Sender: news@sbsvax.cs.uni-sb.de
- Distribution: world,local
- Organization: Studenten-Mail, Rechenzentrum Universitaet des Saarlandes
- Lines: 41
-
- Ok, so there seems to be nobody to answer, I'll post my solution
- to the problem, passing a commandline-sting to a GFA-Basic program.
- It's really quite short:
-
-
- ------------------------------CUT HERE-----------------------------------
- ' Demonstration for passing a command line
- ' string to (compiled) GFA-Basic-programm
- ' Tobias Blickle
- '
-
- GOSUB get_cmd(cmd$)
- writeln("Commandline is:"+cmd$)
- END
- '
- PROCEDURE get_cmd(VAR a$) !reads commandline from basepage
- a$=""
- IF PEEK(BASEPAGE+128)<>0
- a$=CHAR{BASEPAGE+129} !That's the point!
- ENDIF
- RETURN
- '
- PROCEDURE write(was$) !same as PRINT, but redirectable output
- ~GEMDOS(9,L:V:was$)
- RETURN
- '
- PROCEDURE writeln(was$) !WRITE+LF+CR
- write(was$)
- ~GEMDOS(2,10)
- ~GEMDOS(2,13)
- RETURN
-
- ----------------------------CUT HERE-------------------------------------
-
- The procedures WRITE and WRITELN I use, to get an redirectable output
- when using a shell. The original PRINT-command is not redirectable.
-
-
- Bye
-
- Tobias
-