From 6d66bfffb097cbd3022e7ce07235d802295c8c88 Mon Sep 17 00:00:00 2001 From: NovaRain Date: Mon, 17 Jul 2023 20:53:50 +0800 Subject: [PATCH] Edited function and sslc docs --- artifacts/scripting/compiler/sslc_readme.md | 2 ++ artifacts/scripting/functions.yml | 4 +++- artifacts/scripting/sfall function notes.md | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/artifacts/scripting/compiler/sslc_readme.md b/artifacts/scripting/compiler/sslc_readme.md index 4ea0ab45..27fa1ced 100644 --- a/artifacts/scripting/compiler/sslc_readme.md +++ b/artifacts/scripting/compiler/sslc_readme.md @@ -357,6 +357,8 @@ There are several changes in this version of sslc which may result in problems f - fixed unused arguments in a procedure being removed incorrectly by the optimizer - fixed unused string literals in an optimized-out procedure not being removed by the optimizer - fixed `get_array` syntax not working for exported variables +- fixed optional arguments not working for imported procedures +- fixed compiler crash when an exported procedure has no body **sfall 4.2.9:** - added support for additional universal opcodes `sfall_func7` and `sfall_func8` diff --git a/artifacts/scripting/functions.yml b/artifacts/scripting/functions.yml index f63ebccf..99e296bb 100644 --- a/artifacts/scripting/functions.yml +++ b/artifacts/scripting/functions.yml @@ -649,7 +649,9 @@ If both arguments are integers, the result will be an integer. - name: floor2 detail: int floor2(int/float value) - doc: Works just like vanilla floor function, but returns correct integers for negative values (vanilla floor function works exactly the same as `ceil` for negative values, much like `trunc` in C/C++). + doc: | + Works just like vanilla floor function, but returns correct integers for negative floats. + - __NOTE:__ vanilla `floor` function works exactly the same as `ceil` for negative floats (i.e. basically `trunc` in C/C++). macro: sfall.h - name: div detail: div(x, y) diff --git a/artifacts/scripting/sfall function notes.md b/artifacts/scripting/sfall function notes.md index af689f18..65356db0 100644 --- a/artifacts/scripting/sfall function notes.md +++ b/artifacts/scripting/sfall function notes.md @@ -540,8 +540,8 @@ sfall_funcX metarule functions ---- #### floor2 `int sfall_func1("floor2", int/float value)` -- Works just like vanilla `floor` function, but returns correct integers for negative values -- __NOTE:__ vanilla `floor` function works exactly the same as ceil for negative values, much like trunc in C/C++ +- Works just like vanilla `floor` function, but returns correct integers for negative floats +- __NOTE:__ vanilla `floor` function works exactly the same as `ceil` for negative floats (i.e. basically `trunc` in C/C++) ---- #### item_weight