using
REBOL/View 0.9.9.3.1 1-Jun-2000
I note that REBOL doesnt pass on all the command line args anyway. See
example below.
This - along with all the escaping nonsense suggested earlier - means that
it looks impossible
to use REBOL to implement something with a predefined command line syntax.
I have C, C++ and Delphi command-line programs that work with identical
command line args,
containing switches like -v etc, and was hoping to write REBOL equivalents,
using same arg convention.
Is REBOL not a suitable language for this kind of task?
(REBOL newcomer, not yet sure what its good for).
Sean
<--- example of the problem ----->
Try this one line script (in file named argprint.r)
probe system/script/args
Run it like this (assuming rebol executable is on the path)
rebol argprint.r -a hello -b world
And it says.... (note the -a and -b args have disappeared).
<--- pasted output from REBOL follows --->
The command line usage is:
REBOL <options> <script> <arguments>
All fields are optional. Supported options are:
--cgi (-c) Check for CGI input
--do expr Evaluate expression
--help (-?) Display this usage information
--nowindow (-w) Do not open a window
--noinstall (-i) Do not install (View)
--quiet (-q) Don't print banners
--reinstall (+i) Force an install (View)
--script file Explicitly specify script
--secure level Set security level:
(none write read throw quit)
--trace (-t) Enable trace mode
Other command line options:
+q Force not quiet (View)
-s No security
+s Full security
Examples:
REBOL script.r
REBOL script.r 10:30 [EMAIL PROTECTED]
REBOL script.r -do "verbose: true"
REBOL --cgi -s
REBOL --cgi -secure throw --script cgi.r "debug: true"
REBOL --secure none
"hello world"