From add0a9b90c60866e2fc3e1eca5ff0510efc58e2d Mon Sep 17 00:00:00 2001 From: Rafal Kupiec Date: Fri, 20 Jul 2018 23:35:47 +0200 Subject: [PATCH] Update page 'P# 1.0 Draft Specification' --- P%23-1.0-Draft-Specification.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/P%23-1.0-Draft-Specification.md b/P%23-1.0-Draft-Specification.md index 6015f2a..5a3b793 100644 --- a/P%23-1.0-Draft-Specification.md +++ b/P%23-1.0-Draft-Specification.md @@ -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.