Share this page

# for

A control flow keyword used to perform an action repeatedly.

    for (initial_expression, conditional_expression, loop_expression)

All three expressions in the for statement are evaluated. If the initial or conditional expressions are false or become false, the for loop terminates. The initial_expression is evaluated at the start of loop execution only. At each iteration, the conditional_expression and the loop_expression are evaluated. The loop_expression is typically used to increment an index which the conditional_expression uses to terminate the loop.

## Example

The following example converts all characters in character_set to upper case. The for loop iterates through each character in the string character_set.

`char character_set[] = {'a', '5', ' , 'z'}; int i; for(i=0; i<4; i++) {lr_output_message ("%c ", toupper(character_set[i]));}`

    Example: Output:
    Action.c(7): A
    Action.c(7): 5
    Action.c(7): $
    Action.c(7): Z

Tips to improve your search results... VuGen Function Reference Version 26.1 Function Reference 26.1 All View Local Help Center View Online Help Center Version: