[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
--
From: |
Bill Daly |
Subject: |
-- |
Date: |
Mon, 1 Aug 2022 17:34:16 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 |
I've enclosed two workspaces. arg_parser.apl is a library to parse
command line arguments. arg_parser_script.apl is a workspace to test
that workspace. To run the test, place both files in ~/wslib1, chmod
775 wslib1/arg_parser_script.apl and then execute
wslib1/arg_parser_script.apl -- --first=Bill --third=Daly .
I tried moving the -- from the command line to line one of the script
with this result
dalyw@verdun:~$ wslib1/arg_parser_script.apl --first=Bill --third=Daly
DUMPED 2022-07-26 16:36:05 (GMT-4)
NEW )COPY_ONCE workspace: 1 utl
DUMPED 2022-07-26 16:36:05 (GMT-4)
NEW )COPY_ONCE workspace: 1 lex
DUMPED 2022-07-26 16:36:05 (GMT-4)
This workspaces test the arg_parser workspace. Function test_one sets
up a parser object that expects arguments for --first --second and
--third and will dispaly the values of those arguments on the command
line.
The command line must contain an argument '--' which acts as a
delimter between the command line arguments passed to apl and those
passed to this script. So a test run might be:
arg_parser_script -- --first=last --third=first
SYNTAX ERROR, wslib1/arg_parser_script.apl SHOULD BEGIN WITH --
w
arg_parser.apl
Description: Text document
arg_parser_script.apl
Description: Text document
- --,
Bill Daly <=
- Re: --, Dr . Jürgen Sauermann, 2022/08/02