Ask about parameter in jbase
- yukibuwana
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 26
- Thank you received: 0
13 years 2 months ago #10925
by yukibuwana
Ask about parameter in jbase was created by yukibuwana
All,
I have a question about jbase programming. Can jbase receive parameter from outside ?
If I using shell script like this :
vi test.sh
#!/bin/sh
param=$1
echo $param
when I execute:
./test.sh 'Hello'
the output:
Hello
Can jbase routine do like that ?
I have a question about jbase programming. Can jbase receive parameter from outside ?
If I using shell script like this :
vi test.sh
#!/bin/sh
param=$1
echo $param
when I execute:
./test.sh 'Hello'
the output:
Hello
Can jbase routine do like that ?
Please Log in or Create an account to join the conversation.
- durai611
- Offline
- Elite Member
-
Less
More
- Posts: 300
- Thank you received: 51
13 years 2 months ago - 13 years 2 months ago #10931
by durai611
Replied by durai611 on topic Re: Ask about parameter in jbase
Yes, you can. Check the following program.
Compile and run from jshell as shown below,
jsh ~ -->TEST.PROGRAM WELCOME
TEST.PROGRAM
WELCOME
Space should be the delimiter between program name and the parameters.
PROGRAM TEST.PROGRAM
Program.Name = SENTENCE(0)
Program.Parameter = SENTENCE(1)
CRT @(25,30):Program.Name
CRT @(25,31):Program.Parameter
STOP
Compile and run from jshell as shown below,
jsh ~ -->TEST.PROGRAM WELCOME
TEST.PROGRAM
WELCOME
Space should be the delimiter between program name and the parameters.
Last edit: 13 years 2 months ago by durai611.
The following user(s) said Thank You: yukibuwana
Please Log in or Create an account to join the conversation.
- jpb
-
- Offline
- Moderator
-
- retired . . . ¯\_(ツ)_/¯
Less
More
- Posts: 2859
- Thank you received: 650
13 years 2 months ago #10935
by jpb
Replied by jpb on topic Re: Ask about parameter in jbase
For paragraph from VOC you can use <<In>>, where n = 1 is the paragraph itself and n = 2 the given parameters on commandline delimited by space. Missing parameters will be prompted and can be named and formatted by <<I2,Enter 3-digit Name,3A>>
e.g.
File VOC , Record 'LIST.DICT'
Command->
0001 PA
0002 LIST DICT <<I2,NAME OF FILE>>
e.g.
File VOC , Record 'LIST.DICT'
Command->
0001 PA
0002 LIST DICT <<I2,NAME OF FILE>>
Please Log in or Create an account to join the conversation.
- yukibuwana
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 26
- Thank you received: 0
13 years 2 months ago #10998
by yukibuwana
Replied by yukibuwana on topic Re: Ask about parameter in jbase
jpb,
I don't understand. Can you tell me step by step ?
I don't understand. Can you tell me step by step ?
Please Log in or Create an account to join the conversation.
- jpb
-
- Offline
- Moderator
-
- retired . . . ¯\_(ツ)_/¯
Less
More
- Posts: 2859
- Thank you received: 650
13 years 2 months ago - 13 years 2 months ago #11016
by jpb
Replied by jpb on topic Re: Ask about parameter in jbase
Just try it - type in the above, save it and then lauch LIST.DICT F.CUSTOMER.
Details for prompting :
Details for prompting :
Last edit: 13 years 2 months ago by jpb.
The following user(s) said Thank You: durai611
Please Log in or Create an account to join the conversation.
Time to create page: 0.032 seconds