Lotus Script countdown in coding

Asked By 30 points N/A Posted on -
qa-featured

Hello Friends,

Can anyone get me a small sample of Lotus Script countdown in coding along with the working of the loop.

Please also suggest me the different ways of looping using Lotus Script for me to understand the working of Loops using Lotus Script coding.

Thanks and Regards,

Nancy D Serrano

SHARE
Answered By 0 points N/A #167119

Lotus Script countdown in coding

qa-featured

There four types of looping statement in lotus :

For…Next loops
This loop executes a set of statements within a loop for specific no of times.
The syntax is:
For countVar = first To last [ Step increment ]
[ statements ]
Next [ countVar [ , countVar ]… ]
This example shows a For statement that does not use the Step or Next optional items.
Dim power2 As Integer
For iV = 1 To 15
Print iV
Next
Do and Do…While loops
There three variations of do loop.
The syntax is:
Do…Loop
There is no condition.
Do While condition…Loop or Do Until condition…Loop

Here the condition is checked first and only if the condition is true set of statement inside the loop is executed.

Do…Loop While condition or Do…Loop Until condition
Here a set of statement inside the loop is executed and then the condition is checked.

cdoCount% = 0
Do
doCount% = doCount% + 1
If doCount% >= 1000 Then Exit Do
Loop

ForAll loops for lists and arrays

ForAll loop execute once for every element in the array.
The syntax is:
ForAll refVar In container
statements
End ForAll
container names an existing array or list.
Dim persStats List As String ' Declare list of type String.
persStats("Name") = "Ian" ' Assign list elements.
persStats("Age") = "36"
persStats("Home state") = "MD"
ForAll idAttrib In persStats
Print ListTag(idAttrib)": " idAttrib
' For each item in persStats, print its tag and value.
End ForAll
Using the While statement
The set of staments inside the loop is excuted  until the condition is true.
The syntax is:
While condition
statements
Wend

Related Questions