diff --git a/docs/language-overview.md b/docs/language-overview.md index bc32821..ade9f58 100644 --- a/docs/language-overview.md +++ b/docs/language-overview.md @@ -75,13 +75,14 @@ when more text is needed */ - The return statement may appear within a for or an if. - The only effects that a function can have are changing the likelihood, printing things, and returning an output. - Looping allows for limited side-effects. +- Unlike some other languages, the curly braces are mandatory in if statements (the parentheses around the condition are not). ## Working with scalar data
- + @@ -107,7 +108,7 @@ when more text is needed */
FeatureExample
The basic datatypes are integer, real, boolean, and string42 (integer), 3.14 (real), true or false (boolean), "hello" (string)
The basic datatypes are integer, real, boolean, and string42 (Int), 3.14 (Real), true or false (Bool), "hello" (String)
Arithmetic on numbers2.0 + 3.0, 2.0 - 3.0, 2.0 * 3.0, 2.0 / 3.0
Comparisons (return booleans)2.0 < 3.0, 2.0 <= 3.0, 2.0 == 3.0, 2.0 >= 3.0, 2.0 > 3.0
Boolean logic, AND (true if both are true)a && b
-- The basic datatypes are integer, real, boolean, and string. Each of them can be converted to a sequence by []. +- The basic datatypes are integer (Int), real (Real), boolean (Bool), and string (String). Each of them can be converted to a sequence by []. For instance, Int[] for a sequence of integers. - It is not possible to change individual elements. For example: let testSeq[1] = x; // compiler error! ## Probabilistic programming