From 56ca9021acbb4b44c55126394dc62dcede9394d3 Mon Sep 17 00:00:00 2001 From: Jean Dubois Date: Fri, 26 Jul 2024 19:38:51 +0100 Subject: [PATCH] how_it_works.md: Change wiki link to the new documentation --- how_it_works.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/how_it_works.md b/how_it_works.md index faa1dc3..3838683 100644 --- a/how_it_works.md +++ b/how_it_works.md @@ -76,7 +76,13 @@ } } -When the Interpreter wants to create a variable, it creates an entry in the symbol table of the current Context. If it wants to access a variable, it checks in the symbol table of the current Context, but also in its parent, and its parent’s parent, etc. The only case where it doesn’t look into the parent symbol table is in built-in functions, because otherwise if an optional parameter is not given but the user already have a variable with the same name, the interpreter will look to this variable (see issue [#10](https://github.com/jd-develop/nougaro/issues/10)). By the way, this is why it is recommended in [this wiki page](https://github.com/jd-develop/nougaro/wiki/Write-libs#get-arguments) to use the `getf` method of symbol table in built-in functions (see the difference in the code between `get` and `getf`). +When the Interpreter wants to create a variable, it creates an entry in the symbol table of the current Context. If it +wants to access a variable, it checks in the symbol table of the current Context, but also in its parent, and its +parent’s parent, etc. The only case where it doesn’t look into the parent symbol table is in built-in functions, +because otherwise if an optional parameter is not given but the user already have a variable with the same name, the +interpreter will look to this variable (see issue [#10](https://github.com/jd-develop/nougaro/issues/10)). By the way, +this is why it is recommended in [this doc page](https://nougaro.github.io/jd-develop/documentation/1.0/Expand/Write-libs#get-arguments) +to use the `getf` method of symbol table in built-in functions (see the difference in the code between `get` and `getf`). The symbol table is set to its default value at the beginning of the execution of a program, using [this file](src/runtime/set_symbol_table.py)