FORALL STATEMENT



Experts,

I have a recurring application need where I have many conditions to be
evaluated simultaneously, with only a single valid response. For
example, one might have the following code fragment:

forall( 1 = 1:n, all( mask=v-a(i) == 0 ) ) tmp(1) = i
ans: tmp(1)

I know that forall wants an array solution==> I have provided a
artifical array with one location being set equal to i. My question
is: (1) is there another way, (2) is this portable?

Jim Turner

.