Specifications

SERIES 3/3A PROGRAMMING GUIDE
2-10
The
<29>
immediately following the zero at the end of the first zero terminated string indicates that the
remainder of the command line is
0x29
bytes long - as is indeed the case.
The next byte after this is the so-called
command byte
:
a command byte of
'O'
means, for a file-based application, that a named file is to be opened
a command byte of
'C'
means, for a file-based application, that a named file is to be created
a command byte of
'D'
means the application is to connect to the Window Server in background.
A command byte of
'D'
arises only for the built-in applications, and is not considered in the remainder of
this documentation. (When it
does
arise, it is handled automatically by code in
hwim.dyl
, which silently
translates it into one of the other two cases.)
Following the command byte, there is a zero-terminated string giving the public name of the application.
After this comes another zero-terminated string, containing both the default extension and (if present) the
alias info. The alias info, if present, is separated from the default extension by a space.
Finally, yet another zero-terminated string gives the full path name of the file to open or create.
With regard to the above example:
The command byte of the application is
'O'
The public name of the application is
"Program"
The default extension is
".OPL"
The alias info is
"OROPO"
The name of the file to open is
"LOC::M:\DAT\DATA.DBF"
.
Summary of command line format
In summary, the format of the command line of a Series 3 application is as follows:
<command byte><public name><0>[<default extension>[<space><alias info>]<0><full
pathname><0>]
Supplying a command line from the SIBO Debugger
Ordinarily, applications are executed from the System Screen, which automatically constructs a suitable
command line.
When executing an application from the Debugger (or from an alternative "Shell" program), the
command line has to be supplied explicitly. Some examples follow:
SDBG TELE "CTELE",0,"LOC::M:\TEL\TELE.TEL"
- debug the application
tele
giving it the public
name
Tele
, and have it Create the file
LOC::M:\TEL\TELE.TEL
on start up
SDBG DA2 "ODAYS",0,"LOC::A:\ANN\DAYS.ANN"
- debug the application
da2
giving it the public
name
Days
, and have it Open the file
LOC::A:\ANN\DAYS.ANN
on start up
SDBG JO1 "CJOKER",0,0
- debug the application
jo1
(which is not file-based), giving it the public
name
Joker
.
These examples take advantage of the following processing of the command line by the Sibo Debugger:
parameters entered as a string (
"..."
) are passed on to the program with a zero terminating the
string
parameters given in numeric form (eg
0
) are passed on to the program as single bytes
adjacent parameters separated by commas are concatenated.
One drawback of the command line processing of the Sibo Debugger should be pointed out: everything is
automatically upper-cased. This means that if an application button has, for example, been assigned to
the public name
Days
, no application run in this way from the Sibo Debugger will ever be tasked to as a
result of the user pressing the corresponding application button (for public names are in general
case-
sensitive
).