From 88e26d7a1eee735f799a4c15aaebc42c88b749e4 Mon Sep 17 00:00:00 2001 From: dimitri Date: Mon, 25 Mar 2019 20:31:15 +0000 Subject: [PATCH] BLOCKS: Added documentation for Littlefoot Arrays --- .../littlefoot/LittleFoot Language README.txt | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/modules/juce_blocks_basics/littlefoot/LittleFoot Language README.txt b/modules/juce_blocks_basics/littlefoot/LittleFoot Language README.txt index ebc7918e2a..5df61c50d3 100644 --- a/modules/juce_blocks_basics/littlefoot/LittleFoot Language README.txt +++ b/modules/juce_blocks_basics/littlefoot/LittleFoot Language README.txt @@ -64,7 +64,21 @@ Local variables are declared in C++-style syntax: Casts of primitive types are done with function-style syntax, e.g. int x = int (123.0); - float f = float (getIntegerValue()); + float f = float (getIntegerValue()); + +Arrays of any type can be created in the global scope using C-style syntax. +Elements of arrays can be set and read from functions. +Arrays cannot be created within functions or returned from functions. + +For example: + + int foo[12]; + + void initialise() + { + for (int i = 0; i < 12; ++i) + foo[i] = i; + } The program communicates with the host computer by using a shared area of memory called the heap which the host can change. There are some built-in functions