if (tVar is a number) then...
 
[EMAIL PROTECTED] http://www.erikhansen.org


----- Original Message ----
From: Ken Ray <[EMAIL PROTECTED]>
To: Use Revolution List <[email protected]>
Sent: Wednesday, November 22, 2006 7:45:36 PM
Subject: Re: Problem with zeros in lookup table


On 11/22/06 8:08 PM, "Mark Smith" <[EMAIL PROTECTED]> wrote:

> I don't know what a stanine score is, or how you're organizing your
> scores, but you might want to put code in to check whether or not the
> raw score is empty, zero or whatever. Sometimes in Revolution you can
> include an empty variable in a numerical calculation and still get a
> numerical result, rather than an error.

That's a good point. Many times I need to check if a variable is empty or 0
and take the same action. One *could* write it this way:

  if (tVar = 0) or (tVar = "") then

but another (shorter way) is:

  if (tVar + 0) = 0 then

This way, if tVar is 0 or empty, it ends up becoming 0 (empty + 0 = 0).

Ken Ray
Sons of Thunder Software, Inc.
Web site: http://www.sonsothunder.com/
Email: [EMAIL PROTECTED]


_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


 
____________________________________________________________________________________
Cheap talk?
Check out Yahoo! Messenger's low PC-to-Phone call rates.
http://voice.yahoo.com
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to