| 1 |
/* |
| 2 |
* Test of custom event list example from System Manual - String Literals |
| 3 |
* (strlit.htm). |
| 4 |
*/ |
| 5 |
|
| 6 |
atmosphereList: object |
| 7 |
eventList = [ |
| 8 |
'To err is human; to really screw things up you need |
| 9 |
<<one of>>a computer<<or>>a committee of experts<<or>>an |
| 10 |
Act of Parliament<<or>>Vulcan logic<<or>>a roomful of |
| 11 |
lawyers<<cycling>>. ' , |
| 12 |
|
| 13 |
'This message has displayed <<if ++count == 1>>once<< |
| 14 |
else if count == 2>>twice<<else>><<count>> times<<end>>. ' |
| 15 |
] |
| 16 |
|
| 17 |
count = 0 |
| 18 |
|
| 19 |
curIndex = 1 |
| 20 |
getNext() |
| 21 |
{ |
| 22 |
if (curIndex > eventList.length()) |
| 23 |
curIndex = 1; |
| 24 |
|
| 25 |
return eventList[curIndex++]; |
| 26 |
} |
| 27 |
; |
| 28 |
|
| 29 |
main(args) |
| 30 |
{ |
| 31 |
for (local i in 1..10) |
| 32 |
"<<atmosphereList.getNext()>>\b"; |
| 33 |
} |