Thread overview
Once keyword
May 24, 2002
Don Stewart
May 24, 2002
Russ Lewis
May 24, 2002
Sean L. Palmer
May 24, 2002
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
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
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.
>
>