Question 4) Notes Domino 7 Application
SubObjective: Creating Formulas with @Functions
Single Answer Multiple Choice
Which @function will accomplish all of the following?
1. Execute one or more statements iteratively while a condition remains true
2. Execute an initialization statement
3. Check the condition before executing the statements and executes an increment statement after executing the statements
@For provides a looping structure. @For executes one or more statements while the specified condition is true.
The syntax is:
@For(initialization; condition; increment statement; execution statement1; execution statement2;…)
“Initialization” is the statement that assigns a variable with a beginning value. “Condition” is the statement that tests the value of the initialization variable and returns a value of true (1) or false (0). “Increment statement” is the code that increments the initialization variable after each iteration of the loop. “Execution statement” represents what executes.
The condition is tested before each statement executes, so an @For may never execute its statements if the condition test returns false. After each statement executes, the increment statement is executed and the test is performed again.
For example, consider the following button code:
@For(tmp:=1;tmp<5;tmp:=tmp+1;@Prompt([OK];”Temp value”; @Text(tmp)))
In this case, the Prompt message will display four times while the tmp variable is still less than five. Each @Prompt will display the value of the tmp variable.
@DoWhile executes one or more statements while a specified condition is true. It contains no initialization variable or increment statement in the function. @While is a looping structure that also allows one or more statements to be executed based on a certain condition, and it also contains no initialization or increment variable statements in the function.
@ForAll is not a valid Domino formula.
Domino Designer 7 Help – search on: @For
RedBook – Domino Designer 6: A Developer’s Handbook – Chapter 12 http://www.redbooks.ibm.com/abstracts/sg246854.html?Open
These questions are derived from the Self Test Software Practice Test for Lotus exam 710 – Notes Domino 7 Application Development Foundation Skills