Read bytes of data from a file
Source position: amigados.pas line 2574
function ReadArgs( |
const ArgTemplate: PChar; |
Array_: PLongInt; |
Args: PRDArgs |
):PRDArgs; |
Array_ |
|
Array to be filled with the result values. The array must be intialized to the default values before calling ReadArgs(). |
A handle for the memory allocated by ReadArgs(). Must be freed with FreeArgs() later.
Parses the commandline, a given string or DosInput() and fills an argument array according to the options template given. The array must be initialized to the wanted defaults before each call to ReadArgs(). If the rdargs argument is nilReadArgs() tries to parse the commandline and continues on the input channel if it just consists of a single '?', prompting the user for input.
The template string is given as a number of options separated by ',' and modified by '/' modifiers, e.g. 'NAME,WIDTH/N,HEIGHT/N' means get a name string and two numbers (width and height). The possible modifiers are:
|
Find a keyword in a template |
|
|
Reads a single argument/name from command line |
|
|
Free allocated memory after ReadArgs() |
|
|
Creates a dos object |
|
|
Frees an object allocated by AllocDosObject() |