Skip to Content
avatar image
Former Member

Can someone give we script to BREAK a WHILE loop?

I would like to BREAK a WHILE loop for a particular condition.
but BREAK or EXIT don work in BODS script. Kindly let me know if there is another option.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Nov 10, 2017 at 01:46 PM

    for that particular condition write script to make the WHILE condition false (inside loop)

    suppose if your while condition is $WHILE='TRUE'

    for any particular condition write script using IF condition

    IF ( ) --- Here write your particular condition

    $WHILE='FALSE'

    else

    $WHILE='TRUE'

    if FALSE, then it comes out of loop.

    Add comment
    10|10000 characters needed characters exceeded

    • You don't even need the else-part. Because $WHILE is 'TRUE' already (otherwise you wouldn't be in the loop), why would you assign it the same value again?