bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: --


From: Dr . Jürgen Sauermann
Subject: Re: --
Date: Tue, 2 Aug 2022 11:39:30 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

Hi Bill,

not sure if I have fully understood the problem. When I run your example then I get:

eedjsa@server68:~/apl-1.8/src$ wslib1/arg_parser_script.apl -- --first=Bill --third=Daly
DUMPED 2022-08-02  11:27:51 (GMT+2)
NEW )COPY_ONCE workspace: 1 utl
)COPY utl (file /home/eedjsa/apl-1.8/src/wslib1/utl) failed: No such file or directory
NEW )COPY_ONCE workspace: 1 lex
)COPY lex (file /home/eedjsa/apl-1.8/src/wslib1/lex) failed: No such file or directory
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                      
                                                                      VALUE ERROR
ap∆init[2]  ao←lex∆init
               ^

Seems to me like somn workspaces are missing.

Best Regards,
Jürgen





On 8/1/22 11:34 PM, Bill Daly wrote:
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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]