Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: rabbottHi,
If you've attempted to use the BRAINScript "switch" Conditional Operator following the instructions provided in the help file, you may be somewhat perplexed.
"switch" is not fully implemented in the BRAINScript language, and operates as just a function. A simple example is the best way to illustrate its use. If you feed the default Static Data node to the following Filter:
emit id.switch(
1, 10,
2, 20,
3, 30,
40) as id
It will output:
id
int
---
10
20
30
40
40
40
40
40
40
40
40
40
40
40
40
40
40
40
40
40
See also the attached graph.
This "switch" Conditional Operator issue will be addressed in a future product release.
- Bob
Attachments:
switch.brg