From afae89a87a6c6a0cbd6662c247606f479ff7c120 Mon Sep 17 00:00:00 2001 From: Marrub Date: Sat, 24 Nov 2018 16:29:20 -0500 Subject: [PATCH] Expand GetDefaultByType's description - Fix syntax grammar in language doc - Expand GetDefaultByType's description --- zscript-doc-1-language.md | 2 +- zscript-doc-2-api.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/zscript-doc-1-language.md b/zscript-doc-1-language.md index eceecbf..9a1d075 100644 --- a/zscript-doc-1-language.md +++ b/zscript-doc-1-language.md @@ -737,7 +737,7 @@ The syntax for an argument list is: Expression $[ , Expression]$... ``` -Function calls may name arguments which have defaults with the syntax `Identifier: Expression`, possibly skipping over other defaulted arguments. After the first named defaultable argument, all other arguments must be named as well. +Function calls may name arguments which have defaults with the syntax `Identifier : Expression`, possibly skipping over other defaulted arguments. After the first named defaultable argument, all other arguments must be named as well. ### Unary expressions diff --git a/zscript-doc-2-api.md b/zscript-doc-2-api.md index fe99356..a7df5d6 100644 --- a/zscript-doc-2-api.md +++ b/zscript-doc-2-api.md @@ -162,13 +162,13 @@ Global Functions ### Class Handling ``` -Type GetDefaultByType(TypeName); +Type GetDefaultByType(class type); Type New(class typename = ThisClass); ``` - `GetDefaultByType` - Gets the default value of any built-in type. + Returns an object containing the default values for each member of the `Actor` type provided as they would be set in `BeginPlay`. **Note that the return value cannot be serialized and if stored must be marked as `transient`.** The returned object is a pseudo-object which is stored only in-memory. - `New`