Get parm field from command-line.
More...
Go to the source code of this file.
|
integer function | lastch (str) |
|
integer function | notrail (str) |
|
subroutine | w3as00 (nch_parm, cparm, iret_parm) |
| To get the one command-line argument which starts with "parm="; returning the parm field (without the keyword "parm=") as a null-terminated string in the character string:cparm.
|
|
Get parm field from command-line.
- Author
- David Shimomura
- Date
- 1995-05-23
Definition in file w3as00.f.
◆ lastch()
integer function lastch |
( |
character*(*) |
str | ) |
|
◆ notrail()
integer function notrail |
( |
character*(*) |
str | ) |
|
◆ w3as00()
subroutine w3as00 |
( |
integer |
nch_parm, |
|
|
character*(*) |
cparm, |
|
|
integer |
iret_parm |
|
) |
| |
To get the one command-line argument which starts with "parm="; returning the parm field (without the keyword "parm=") as a null-terminated string in the character string:cparm.
Program history log:
- David Shimomura 1995-05-23
- Boi Vuong 1998-03-10 Remove the cdir$ integer=64 directive
- Parameters
-
[out] | NCH_PARM | No. of characters in the parm field |
[out] | CPARM | C*(*) cparm – the destination for the parmfield obtained from the command line; user should define the character string for a size .le. 101-bytes, which would be big enough for the 100-char ibm limit plus one extra byte for my null-terminator. |
[out] | iret_parm | - Return code
- = 0; Normal return
- = -1; Abnormal exit. the user has failed to define the cparm destination as a character string.
- = +1; A Warning: the given arg in the command line was too long to fit in the destination: cparm, so i have truncated it.
- = +2; A warning: no args at all on command line, so i could not fetch the parm field.
- = +3; A warning: no "parm="-argument exists among the args on the command line, so i could not fetch the parm field.
|
- OKL:
- FT06F001 - Some checkout printout
- Note
- To emulate the ibm parm field, the user should key_in on the command line:
- parm='in between the single_quotes is the parm field' what is returned from w3as00() from the parm= arg is the parm field: which starts with the location beyond the equal_sign of the keyword "parm=", and includes everything which was within the bounds of the single-quote signs. But the quote signs themselves will disappear; and a null- terminator will be added. The starting "parm=" is a key word for the parms, and should not be used to start any other argument.
-
I have changed the call sequence by adding a return code.
- Author
- David Shimomura
- Date
- 1995-05-23
Definition at line 53 of file w3as00.f.