## D - Once keyword

• Don Stewart (5/5) May 24 2002 Another interesting keyword I found whilst looking at Sather is the once
"Don Stewart" <donald genient.com> writes:
```Another interesting keyword I found whilst looking at Sather is the once
keyword. It is used during iteration some thing along the lines of

for ( int i = 0; i < 10, once(j != null); i++ )

where j !=null is only tested on the first evaluation, and is not checked
subequently.
```
May 24 2002
Russ Lewis <spamhole-2001-07-16 deming-os.org> writes:
```Don Stewart wrote:

Another interesting keyword I found whilst looking at Sather is the once
keyword. It is used during iteration some thing along the lines of

for ( int i = 0; i < 10, once(j != null); i++ )

where j !=null is only tested on the first evaluation, and is not checked
subequently.

So it's the same as:
if(j != null)
for( int i = 0; i < 10; i++ )

--
The Villagers are Online! http://villagersonline.com

.[ (the fox.(quick,brown)) jumped.over(the dog.lazy) ]
.[ (a version.of(English).(precise.more)) is(possible) ]
?[ you want.to(help(develop(it))) ]
```
May 24 2002
"Sean L. Palmer" <seanpalmer earthlink.net> writes:
```Just write:

if (j != null)
for ( int i = 0; i < 10; i++ )

"Don Stewart" <donald genient.com> wrote in message
news:acln46\$k12\$1 digitaldaemon.com...
Another interesting keyword I found whilst looking at Sather is the once
keyword. It is used during iteration some thing along the lines of

for ( int i = 0; i < 10, once(j != null); i++ )

where j !=null is only tested on the first evaluation, and is not checked
subequently.

```
May 24 2002