From d0fa304035006f6ef3d6540043d29cbd00964880 Mon Sep 17 00:00:00 2001 From: NovaRain Date: Fri, 22 Jul 2022 22:22:48 +0800 Subject: [PATCH] Minor edits to sslc document --- artifacts/scripting/compiler/sslc_readme.md | 4 ++-- docs/Gemfile.lock | 2 +- docs/sslc.md | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/artifacts/scripting/compiler/sslc_readme.md b/artifacts/scripting/compiler/sslc_readme.md index 77aefa50..6a649830 100644 --- a/artifacts/scripting/compiler/sslc_readme.md +++ b/artifacts/scripting/compiler/sslc_readme.md @@ -234,12 +234,12 @@ Syntax which requires sfall for compiled scripts to be interpreted is marked by - old: ``` callbackVar := "Node000"; - callbackVar(); + call callbackVar; ``` - new: ``` callbackVar := @Node000; - callbackVar(); + call callbackVar; ``` Not many people know that since vanilla Fallout you can call procedures by "calling a variable" containing it's name as a string value. There was a couple of problems using this: - optimizer wasn't aware that you are referencing a procedure, and could remove it, if you don't call it explicitly (can be solved by adding making procedure `critical`) diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index 7e894525..04fec695 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -265,7 +265,7 @@ GEM thread_safe (0.3.6) typhoeus (1.4.0) ethon (>= 0.9.0) - tzinfo (1.2.9) + tzinfo (1.2.10) thread_safe (~> 0.1) tzinfo-data (1.2021.1) tzinfo (>= 1.0.0) diff --git a/docs/sslc.md b/docs/sslc.md index 2bd1a479..2e0a1617 100644 --- a/docs/sslc.md +++ b/docs/sslc.md @@ -242,12 +242,12 @@ Syntax which requires sfall for compiled scripts to be interpreted is marked by - old: ``` callbackVar := "Node000"; - callbackVar(); + call callbackVar; ``` - new: ``` callbackVar := @Node000; - callbackVar(); + call callbackVar; ``` Not many people know that since vanilla Fallout you can call procedures by "calling a variable" containing it's name as a string value. There was a couple of problems using this: - optimizer wasn't aware that you are referencing a procedure, and could remove it, if you don't call it explicitly (can be solved by adding making procedure `critical`)