-
Notifications
You must be signed in to change notification settings - Fork 0
Class Program
Kristian Virtanen edited this page Oct 28, 2024
·
4 revisions
The Program
class provides methods and properties related to the execution of the program, including handling command-line arguments, introducing delays, and terminating the program. It also includes error handling via the LastError
property, which stores the most recent error message if an operation fails.
-
Description: Stores the last error message, if any operation fails, including a timestamp in
yyyy-MM-dd HH:mm:ss
format. -
Example:
"2024-10-16 14:30:00: Invalid argument index."
- Differences from orig. SB: New feature for SBOE.
- Description: Returns the number of command-line arguments passed to the program (excluding the program name).
- Differences from orig. SB: none.
- Description: Returns the directory where the program is being executed.
- Differences from orig. SB: none.
- Description: Delays the program execution for the specified number of milliseconds.
-
Parameters:
-
milliSeconds
: The number of milliseconds to delay the program.
-
- Differences from orig. SB: none.
- Description: Pauses the program execution for the specified number of seconds. The sleep can be interrupted by a key press.
-
Parameters:
-
seconds
: The number of seconds to sleep.
-
- Differences from orig. SB: New feature for SBOE.
- Description: Ends the program execution immediately.
- Differences from orig. SB: none.
- Description: Retrieves the command-line argument at the specified index (0-based).
-
Parameters:
-
index
: The index of the command-line argument to retrieve.
-
-
Returns: The command-line argument as a string, or
null
if the index is invalid. - Differences from orig. SB: none.