that's <CFIF isDefined("myvar")>.
chris olive, cio
cresco technologies
[EMAIL PROTECTED]
http://www.crescotech.com
-----Original Message-----
From: Bonnie Betts [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 18, 2001 8:45 PM
To: CF-Talk
Subject: Re: <cfif myvar IS true> vs <cfif myvar>
I thought <cfif myvar> tested to see if it existed...... no?
Bonnie E. Betts
[EMAIL PROTECTED]
www.interacttechs.com
----- Original Message -----
From: "Bert" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, April 18, 2001 6:19 AM
Subject: <cfif myvar IS true> vs <cfif myvar>
> There seems to be a difference in the outcome of <cfif myvar IS true> and
<cfif myvar>, when myvar is a number but neither 0 nor 1.
>
> Is this a feature to be used, or a bug, or have i missed something?
>
> Bert
>
> ps save the code below as trueorfalse.cfm to see what i mean:
>
> <cfparam name="myvar" default="2">
>
> <cfoutput>
>
> <b>#myvar#:</b>
> <cfif myvar IS true>
> myvar IS true
> <cfelseif myvar IS false>
> myvar IS false
> <cfelse>
> cfelse (i.e. NOT "myvar IS true" OR "myvar IS false")
> </cfif>
> <br>
>
> <b>#myvar#:</b>
> <cfif myvar>
> myvar
> <cfelseif NOT myvar>
> NOT myvar
> <cfelse>
> cfelse (i.e. NOT "cfif myvar" OR "cfif NOT myvar")
> </cfif>
>
> <form action="trueorfalse.cfm" method="post">
> <input type="text" name="myvar" value="#myvar#">
> <input type="Submit">
> </form>
>
> </cfoutput>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists