From 142c01e4431e1b7fd2d2bdb72ef41adc66659edb Mon Sep 17 00:00:00 2001 From: Fcalva Date: Mon, 3 Mar 2025 10:29:04 +0100 Subject: [PATCH] Update spec.md --- spec.md | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/spec.md b/spec.md index 5e99c10..c394542 100644 --- a/spec.md +++ b/spec.md @@ -91,20 +91,6 @@ In this document : - `(while [expressions])`: while cond evalutates to true, will execute optional expressions -- `(for ( ) [expressions])` - Will initialize a local scope variable var with the type of the vector vec, - and execute expressions for every element of vec. var will be set to the - element of vec interated on - Example: - ``` - (let:vec:int a (1,2,3)) - (for (a i) - (write i) - (write " ") - ) - ``` - will display `1 2 3 ` - - `(fn ( [arg0[:type] ... argN[:type]]) [expressions])` : Declares a function of name name, optional args arg0-argN with optional types (recommended to explicit them), that executes optional expressions @@ -232,10 +218,9 @@ if 1:2 / 1:2:3, means stitching 1,2,3 together as a 2 or 3 byte value - `popl` : pops the last #2 values on stack, starting from #1 - `cst0` : 2:3 -> LSW of 3 - `cst1` : 2:3 -> MSW of 3 -- `iter` : Iterates on vector 1, keeping track with int value at 2, and sets - int value at 3 to 1 when done - to 1 - `not` : !1 -> stack - `and` : 1 && 2 -> stack - `or` : 1 || 2 -> stack +- `vpop` : removes element at pos 2 of vec 1 -> stack +- `vpsh` : pushes back 2 on vector 1