Hi,
For each is for iterating through collections, not arrays.
Tom
On Aug 20, 2008, at 3:25 PM, Michael Check wrote:
Using A4D 4.5r1 with 4D 2004.5
I've been staring at this way too long. Can anyone see an obvious
reason why the for each below does not work the way the for loop does?
CODE
writebr(concat(" "; 'Records found:'; string(size of
array(account_AT))))
if(size of array(account_AT)>0)
c_longint($idx)
c_text($value)
for each (account_AT; $value; $idx)
writebr('Account: %1%' % $value)
writebr('Password: %1%' % password_AT{$idx})
end for each
writebr
for ($idx; 1; size of array(account_AT))
writebr('Account: %1%' % account_AT{$idx})
writebr('Password: %1%' % password_AT{$idx})
end for
end if
RESULTS
Records found: 3
Account: 11111
Password: password
Account: 11111
Password: password
Account: 22222
Password: password
Account: 33333
Password: password
Thanks,
Michael Check
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/