I think every time, since it's the second argument.

If it doesn't matter, you can do "for i = dcount(array,@fm) to 1 step -1" to 
have it evaluate once.

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Peter Cheney
Sent: Monday, February 11, 2013 12:15 AM
To: U2 Users List ([email protected])
Subject: [U2] : Evaluating DCOUNT

Hi Everyone,

Does a DCOUNT get evaluated again for each iteration of a loop?
Or is UniVerse these days intelligent enough to keep track of what's going on?

e.g.

for i = 1 to dcount(array,@fm)
   *commands here
next i

versus

totalattributes = dcount(array,@fm)
for i = 1 to totalattributes
   *commands here
next i

Apart from readability and perhaps easier debugging is there an actual internal 
difference?
I know it was an issue on older pick releases but I cannot remember if it ever 
affected UV?

Cheers
Peter


 -------------------------------------------------------------------------------
Note:
This email (inc all attachments) is for the use of the intended recipient(s) 
only.
Privileged or confidential information may be contained in this communication. 
If you have received this email in error, please notify the sender immediately 
and then delete all copies of this message from your computer network. If you 
are not the intended recipient, you must not keep, use, disclose, copy or 
distribute this email without the author's prior permission. If you are the 
intended recipient and you do not wish to receive similar electronic messages 
from us in future, then please respond to the sender to this effect.
We have taken precautions to minimise the risk of transmitting software 
viruses, but advise you to carry out your own virus checks on this email and 
its attachments. We do not accept liability for any loss or damage caused by 
software viruses and do not represent that this transmission is free from 
viruses or other defects.
Firstmac Limited (ABN 59 094 145 963) (AFSL 290600)
 -------------------------------------------------------------------------------
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
________________________________


Dave Davis
Team Lead, R&D

P: 614-875-4910 x108
F: 614-875-4088
E: [email protected]
        [http://www.harriscomputer.com/images/signatures/HarrisSchools.jpg]

[http://www.harriscomputer.com/images/signatures/DivisionofHarris.gif]<http://www.harriscomputer.com/>
        6110 Enterprise Parkway
Grove City, OH
43123
www.harris-schoolsolutions.com<http://www.harris-schoolsolutions.com>

This message is intended exclusively for the individual or entity to which it 
is addressed. This communication may contain information that is proprietary, 
privileged or confidential or otherwise legally exempt from disclosure. If you 
are not the named addressee, you are not authorized to read, print, retain, 
copy or disseminate this message or any part of it. If you have received this 
message in error, please notify the sender immediately by e-mail and delete all 
copies of the message.

_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to