From 5a528874891b0df8705a32261014b624f6c7c37e Mon Sep 17 00:00:00 2001 From: funkywaddle Date: Wed, 26 Nov 2025 20:26:17 +0000 Subject: [PATCH] Update README.md. Add Variable docs. --- README.md | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f760e9d..b5f7c36 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,28 @@ Animal/Dog -> [Mammal, Domesticated] { } ``` +### Variables + +Variables are always Protected scoped. +There is no way to make them Public or Private. +This is by design. + +#### Variable Declaration + +##### Declare Now, Set later +```waddle +Integer num; + +fn on_create(Integer my_num) -> [None] { + my.num.set(my_num); +} +``` + +##### Declare and Set at same time +```waddle +Integer num.set(1000); +``` + ### Functions #### Function declaration @@ -203,8 +225,7 @@ result = Boolean.and( #### Object Method Boolean Checks ```waddle if(my.age.gt(18).and(my.status.is(Verified))){ - my.age.gt(18), - my.status.is(Verified) + // Pass check } ```