-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 25-add-builtin-parameters
- Loading branch information
Showing
204 changed files
with
8,341 additions
and
10,510 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Aggregations | ||
|
||
To _aggregate_ [data][data] [grouped by][grouped by] an [ID][id] over a [function][functions] we can use the aggregation expression: | ||
|
||
```ttsl | ||
aggregate sum of salery, taxes groupedBy hh_id | ||
``` | ||
|
||
Let's break down the syntax: | ||
|
||
- The keyword `#!ttsl aggregate`. | ||
- The [function][functions] to be executed on the grouped values (here `#!ttsl sum`). | ||
- The keyword `#!ttsl of`. | ||
- A [List][List] of [data][data] separated by a comma (here `#!ttsl salery, taxes`). | ||
- The [grouped by][grouped by] modifier (here with the id `#!ttsl hh_id`). | ||
|
||
An aggregation can be executed on one or multiple data values that are all connected to the same given [ID][id]. | ||
|
||
[data]: data.md | ||
[grouped by]: modifier.md#grouped-by | ||
[id]: modifier.md#id | ||
[functions]: functions.md | ||
[List]: types.md#lists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Constants | ||
|
||
_Constants_ define a constant value, that can only be defined once and can not be changed. A constant has a certain [type][types], [visibility][Visibility] and [validity][Validity]. | ||
|
||
```ttsl | ||
constant value1: Int = 1 | ||
Here are the pieces of syntax: | ||
- The keyword `#!ttsl constant` | ||
- The name of the constant (here `#!ttsl value1`). This can be any combination of upper- and lowercase letters, underscores, and numbers, as long as it does not start with a number. However, we suggest to use `#!ttsl lowerCamelCase` for the names of parameters. | ||
- A colon. | ||
- The [type][types] of the constant (here `#!ttsl Int`). | ||
- An equals sign. | ||
- The value of the constant (here `#!ttsl 1`). This must be a constant [expression][Expressions], i.e. something that can be evaluated by the compiler. Particularly [calls][calls] usually do not fulfill this requirement. | ||
## Visibility | ||
The [visibility][Visibility] of constants can be chosen by putting one of the three keywords `public`, `packageprivate`, `private` in front of the constant declaration. The default [visibility][Visibility] is public. Here is an example: | ||
```ttsl | ||
packageprivate constant value1: Int = 1 | ||
``` | ||
|
||
## Validity | ||
|
||
The documentation for the [validity of constants][constantValidity] can be found in the [validity][Validity] section. | ||
|
||
[types]: types.md | ||
[Visibility]: modifier.md#visibility | ||
[Validity]: validity.md | ||
[constantValidity]: validity.md#constants |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Data | ||
|
||
_Data_ defines a value given by the user via an input. It can then be accessed via a chosen namespace. Data has a certain [type][types], [visibility][Visibility], [validity][Validity] and can be an [id][id]. | ||
|
||
```ttsl | ||
data PersonAge: Int; | ||
``` | ||
|
||
Here are the pieces of syntax: | ||
|
||
- The keyword `#!ttsl data` | ||
- The name of the data (here `#!ttsl PersonAge`). This can be any combination of upper- and lowercase letters, underscores, and numbers, as long as it does not start with a number. However, we suggest to use `#!ttsl lowerCamelCase` for the names of parameters. | ||
- A colon. | ||
- The [type][types] of the data (here `#!ttsl Int`). Data can only be and Int, Float, Boolean or String. | ||
|
||
## Visibility | ||
|
||
The [visibility][Visibility] of data can be chosen by putting one of the three keywords `public`, `packageprivate`, `private` in front of the constant declaration. The default [visibility][Visibility] is public. Here is an example: | ||
|
||
```ttsl | ||
packageprivate data PersonAge: Int; | ||
``` | ||
|
||
## ID | ||
|
||
There can also be an [ID modifier][id] added to the data to implicate that the data is unique and can be used to identify an object. The [ID modifier][id] is added by placing the keyword `id` in front of the data declaration. For example: | ||
|
||
```ttsl | ||
id data PersonID: Int; | ||
``` | ||
|
||
[types]: types.md | ||
[id]: modifier.md#id | ||
[Visibility]: modifier.md#visibility | ||
[Validity]: validity.md |
Oops, something went wrong.