Update page 'P# 1.0 Draft Specification'

2018-07-20 23:35:47 +02:00
parent ddc4057c3a
commit add0a9b90c

@@ -73,8 +73,10 @@ A constant is an identifier for a value which cannot change during the execution
## 4. Basic concept
### 4.1. Script startup
P# is an interpreted language, thus a program or script does not have to be compiled as an application that may be started. An interpreted program shall contain exactly one method qualifying as an entry point by satisfying the following requirements:
It has to be a constructor of class named *Main*
* It has to be a constructor of class named *Main*,
* The return type shall be void or int,
* It shall not be a partial method without an implementation,
* The formal parameter list shall either be empty, or have a single value parameter of type string[],
### 4.2. Script termination
If the return type of the script's entry point method is int, the value returned serves as the scripts's termination status code. The purpose of this code is to allow communication of success or failure to the execution environment. If the return type of the entry point method is void, reaching the right brace (}) that terminates that method, or executing a return statement that has no expression, results in a termination status code of 0.