Welcome Guest

Pages: 1
Math/Counter
LouisMackey111PostDecember 14, 2018, 17:25
Newbie
Posts: 14
Registered:
November 8, 2014, 19:45
Normal topicMath/Counter

I want to count the number of times I go thru a section of code what can I used as a counter?

2MR2PostDecember 14, 2018, 17:37
Avatar photo
Administrator
Posts: 2079
Registered:
August 23, 2012, 19:27
Normal topicRe: Math/Counter

Variables and Named Variables can be used on any of the numeric statements:

Increment named variable 'Counter'

Named Variables are created when first set and are empty, or 0, until created. The above Increment statement will create the Named Variable if it does not exist. So the first Increment will set it to 1.

You can use a Compare Numeric Test statement to test the value.

Test if the numeric value of named variable 'Counter' > "5" (Set result)
if true
...
endif

LouisMackey111PostDecember 15, 2018, 14:17
Newbie
Posts: 14
Registered:
November 8, 2014, 19:45
Normal topicRe: Math/Counter

Thats got it.

Thanks.

Pages: 1
Mingle Forum by Cartpauj | Version: 1.1.0beta | Page loaded in: 0.022 seconds.