Removing Spaces

Chris Sharman chris.sharman@ccagroup.co.uk
Fri, 18 Mar 2005 11:46:21 +0000


brian_matthewsbrian matthews wrote:
> after off list conversations, I now suspect that my remark 'defines are 
> evaluated only when referenced' may be a fusion of related half-truths 
> and not strictly accurate in this case.

I thought you were right first time - although qtp and quiz are slightly 
different, I believe. I think quiz executes defines once per record 
complex (whether the records are selected or not - this can cause some 
unlooked-for effects and data conversion errors), and qtp does them each 
time they're referenced - potentially many times per record complex, so 
temp & item are preferable if you use them more than once.

> Having said that, the part about adding syntax ' if record ... exists' 
> is true, and WILL solve the problem.
> 
> I looked into this further and found that only the defines which do not 
> reference a record item need this syntax to be added i.e. in this case, 
> one of the setsytemval defines and the getsystemval; I believe this is 
> because PH assumes that they are constants and need not be evaluated 
> again. Once the defines are tied to a record item quiz will reavaluate 
> for each record.
> 
> One other thing, I also believe that defines which are thought to be 
> constants, are evaluated before any retrieval takes place - when they do 
> not reference a record item.

Never heard that before, although it seems fairly sensible most of the 
time, but could be subverted by systemvalues.
Would Bob/Alison like to shed some authoritative light here ?

Chris


-----------------------------------------------------------------------

Any views expressed in this message are those of the sender and not
necessarily those of CCA Group.  The unauthorized use, disclosure,
copying or alteration of this message is forbidden.  The contents of
this message may be confidential and/or privileged, copyright CCA Group
and are intended solely for the use of the individual or entity to whom
they are addressed.  Whilst this message has been scanned, CCA Group
cannot guarantee that it is virus free or compatible with your systems
and accepts no responsibility for any loss or damage arising from its
use. The recipient is advised to run their own anti-virus software. If
you receive this message in error please contact
postmaster@ccagroup.co.uk immediately, destroy any copies and delete it
from your computer systems.