Update page 'P# 1.0 Draft Specification'
@@ -85,7 +85,7 @@ Output from P# scripts is sent to the console is CLI SAPI is being used. If same
|
||||
The print keyword does not add a new line to the output, script author has to put it manually.
|
||||
|
||||
### 4.4. Command-line Arguments
|
||||
P# scripts can receive command line arguments. They follow the name of the program. The $argv is an array holding all arguments of a script. The $argc holds the number of arguments passed, including the name of the script.
|
||||
P# scripts can receive command line arguments. They follow the name of the program. To access them, the main class constructor has to take a string[] argument. It is an array holding all arguments of a script to provide the program some values at the moment of execution. To check the number of parameters passed, sizeof() builtin function should be used.
|
||||
|
||||
### 4.5. Declarations
|
||||
Declarations in a P# script define the constituent elements of the program. Type declarations are used to define classes, structs, interfaces and enums. The kinds of members permitted in a type declaration depend on the form of the type declaration. For instance, class declarations can contain declarations for constants, properties, methods, instance constructors and destructors.
|
||||
|
||||
Reference in New Issue
Block a user