previous next top contents index framed top this page unframed
Windows-based MAINSAIL bootstraps obtain the command line from the
Command Line property associated
with the bootstrap itself. You can
change this property by selecting
the icon for the bootstrap in question
and choosing Properties from the
File menu. However, this mechanism is
not very flexible, since after
you change the command line, the
bootstrap is always run with the same command line arguments.
5.5. $programName
$programName is unavailable from Windows-based bootstraps. From
character-based bootstraps, it returns
the name of the program as it was
entered to the Command Prompt window prompt.
5.6. $directory
When $fullPathNames is set, file
names produced by $directory include
the drive name.
5.7. $fileInfo
Full path names produced by $fileInfo
include the drive name. All fields
of the $fileInfoCls record are
set for non-directory files (NT maintains
separate create and modify dates
for such files). For directories, the
$OSDSize, $createDate, $createTime,
$modifyDate, and $modifyTime fields
are not set.
$fileAttr can have the following bits set in it:
| base | extension | path | $composeFileName |
|---|---|---|---|
| "abc" | "msl" | "" | "abc.msl" |
| "a.b" | "c" | "xyz" | "xyz\a.b.c" |
| "xyz" | "" | "\foo" | "\foo\xyz" |
| "xyz" | "" | "c:\foo" | "c:\foo\xyz" |
| pathPrefix | pathComponents | $composePath |
|---|---|---|
| "" | "" | "" |
| "" | "xyz" | "xyz" |
| "\" | "foo" | "\foo" |
| "c:\" | "foo" & eol & "bar" | "c:\foo\bar" |
| "\\srv\xyz\" | "baz" | "\\srv\xyz\baz" |
| path | pathPrefix | pathComponents |
|---|---|---|
| "c:\x\y" | "c:\" | "x" & eol & "y" |
| "\x\y" | "\" | "x" & eol & "y" |
| "c:x\y" | "c:" | "x" & eol & "y" |
| "\\srv\shar\x\y" | "\\srv\shar\" | "x" & eol & "y" |
$decomposeFileName("abc",base,extension)
yields base = "abc" and extension = "".
If a file name contains exactly one period, the base is the part before the period, and the extension the part after, so that:
$decomposeFileName("ab.c",base,extension)
results in base = "ab" and extension = "c".
If a file name contains multiple periods, the part after the last period is treated as the extension. Thus:
$decomposeFileName("a.b.c",base,extension)
leaves base = "a.b" and extension = "c".
5.12. $userID
$userID obtains the user ID by calling
the GetUserName system function.
$login is ignored.
5.13. $cpuID
$cpuID is not implemented, and
therefore always returns the empty
STRING.
5.14. Exit Codes
$successExitCode is '0L, and
$failureExitCode is 'HFFFFFFFFL. The
operating system does not seem to do anything with these values,
however.
5.15. $truncateFile
$truncateFile is fully supported.
5.16. Environment Variable PROCEDUREs
NTPNT MAINSAIL provides several
PROCEDUREs for manipulating operating
system environment variables. The PROCEDURE headers are:
BOOLEAN
PROCEDURE $getEnvironmentVars
(PRODUCES STRING ARRAY(1 TO *)
environment;
OPTIONAL PRODUCES STRING msg);
BOOLEAN
PROCEDURE $lookupEnvironmentVar
(STRING name;
OPTIONAL PRODUCES STRING value);
BOOLEAN
PROCEDURE $setEnvironmentVar
(STRING name,value;
OPTIONAL PRODUCES STRING msg);
BOOLEAN
PROCEDURE $deleteEnvironmentVar
(STRING name;
OPTIONAL PRODUCES STRING msg);
$getEnvironmentVars produces an ARRAY environment containing the names and values of all currently defined environment variables. Each element is of the form name=value. The caller is responsible for disposing the environment ARRAY.
$lookupEnvironmentVar sets value to the value of the environment variable named name. It fails if no such environment variable exists.
$setEnvironmentVar sets the value of the environment variable named name to value.
$deleteEnvironmentVar removes the environment variable named name.
All these PROCEDUREs return TRUE if successful; if unsuccessful, they set msg to a STRING describing the error and return FALSE.
MAINSAIL System-Specific User's Guides, Chapter 5