LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only

"switch" Conditional Operator

  • 1.  "switch" Conditional Operator

    Employee
    Posted 09-29-2009 11:47

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: rabbott

    Hi,

    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