diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a3793f..4fd411a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ * concurrent compiling * errors are handled per file and won't stop the whole compilation * function name check for build in functions -* function parameter count check for build in functions +* simpler syntax for "null" and unary buildin functions **1.1.1** diff --git a/README.md b/README.md index bfa5c46..76af82b 100644 --- a/README.md +++ b/README.md @@ -141,6 +141,8 @@ var _x = add(); // result in _x is 0 ``` +When trying to define a function with a name that exists in the build in function set, you'll get an compile error. + ### Call build in commands To call SQF build in commands (like hint, getDir, addItem, ...) we have to use a different syntax. @@ -161,6 +163,13 @@ foo(x, y, z)(1, 2, 3); [x, y, z] foo [1, 2, 3]; ``` +If the build in function does not accept parameters or only on one side (unary function), it can be called with a single pair of brackets: + +``` +hint("your text"); +shownWatch(); +``` + ### Special functions There are some special functions in SQF, which also require special syntax in ASL. The examples presented here show how they are written in ASL and what the output will look like. Remember that ASL is case sensitive! @@ -251,7 +260,7 @@ Keywords should not be used as identifiers. Here is a full list of all keywords ## What's missing? -The following features are not implemented yet, but will be in 1.1.0 or a future version: +The following features are not implemented yet, but will be in 1.3.0 or a future version: * scopes * else if @@ -262,7 +271,7 @@ scopes won't be supported, since they are a stupid concept and can be replaced b Selectors in expressions do not work (yet): ``` -var x = ([1, 2, 3]-[1, 2])[0]; // should result in 3 +var x = ([1, 2, 3]-[1, 2])[0]; // should result in 3, but does not work ``` ## Contribute @@ -277,6 +286,11 @@ For further information you can read the SQF tutorial and documentation of scrip * [Scripting commands](https://community.bistudio.com/wiki/Category:Scripting_Commands_Arma_3) * [Scripting preprocessor](https://community.bistudio.com/wiki/PreProcessor_Commands) +Interesting pages to visit: + +* [Bohemia forum topic](https://forums.bistudio.com/topic/185649-asl-arma-scripting-language-compiler/) +* [Armaholic page](http://www.armaholic.com/page.php?id=29720) + ## License MIT