Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

CommandParm – PB Docs 150 – PowerBuilder Library

CommandParm – PB Docs 150

CommandParm PowerScript function

Description

Retrieves the argument string, if any, that followed the program
name when the application was executed.

Syntax

Return Values

String. Returns the application’s
argument string if it succeeds and the empty string (“”) if it fails
or if there were no arguments.

Usage

Command arguments can follow the program name in the command
line of a Windows program item or in the Program Manager’s
Run response window. For example, when the user chooses File>Run
in the Program Manager and enters:

CommandParm retrieves the string C:EMPLOYEEEMPLIST.TXT.

If the application’s command line includes several
arguments, CommandParm returns them all as a
single string. You can use string functions, such as Mid and Pos,
to parse the string.

You do not need to call CommandParm in
the application’s Open event. Use the commandline argument
instead.

Examples

These statements retrieve the command line arguments
and save them in the variable ls_command_line:

If the command line holds several arguments, you
can use string functions to separate the arguments. This example
stores a variable number of arguments, obtained with CommandParm,
in an array. The code assumes each argument is separated by one
space. For each argument, the Pos function searches
for a space; the Left function copies the argument
to the array; and Replace removes the argument
from the original string so the next argument moves to the first position:


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x