Isnt there a CF function that takes a 1 or 0 and converts it to display True or
False?
Or am I dreaming?
~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
YesNoFormat does it for yes and no, but nothing built in for true and false.
cheers,
barneyb
On 3/8/09, Chad Gray cg...@careyweb.com wrote:
Isnt there a CF function that takes a 1 or 0 and converts it to display True
or False?
Or am I dreaming?
Ah.. I was not dreaming. I knew there was something built in.
Thanks Barney!
-Original Message-
From: Barney Boisvert [mailto:bboisv...@gmail.com]
Sent: Sunday, March 08, 2009 1:31 PM
To: cf-talk
Subject: Re: true false
YesNoFormat does it for yes and no, but nothing built
: (626) 593 - 5501
-Original Message-
From: Chad Gray [mailto:cg...@careyweb.com]
Sent: Sunday, March 08, 2009 10:23 AM
To: cf-talk
Subject: true false
Isnt there a CF function that takes a 1 or 0 and converts it to display True
or False?
Or am I dreaming
elsewhere.
Professional. Dedicated. Effective.
The Easy 24/7 way to get started: http://www.goldengrove.net/
or you can call: (626) 593 - 5501
-Original Message-
From: William Seiter [mailto:will...@seiter.com]
Sent: Sunday, March 08, 2009 10:43 AM
To: cf-talk
Subject: RE: true false
You can
: Sunday, March 08, 2009 1:31 PM
To: cf-talk
Subject: Re: true false
YesNoFormat does it for yes and no, but nothing built in for true and
false.
cheers,
barneyb
On 3/8/09, Chad Gray cg...@careyweb.com wrote:
Isnt there a CF function that takes a 1 or 0 and converts
You're possibly thinking of Railo's TrueFalseFormat function.
Does exactly the same as YesNoFormat, but with true and false.
~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free
#IIF(myvar eq 1, DE(true), DE(false))#
Actually you can get a little bit cleaner than this even:
#iif(myvar,true,false)#
True and false don't need the DE wrappers because they're boolean values,
so they evaluate to themselves and then as long as myvar is a boolean,
you don't have
Indeed, evaluating to 1 is not strictly correct because:
false = 0
true = not false
Dominic
~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
Yes, but I think he wanted it to display TRUE or FALSE the way the
yesnoformat displays YES or NO.
On Sun, Mar 8, 2009 at 11:50 AM, s. isaac dealey i...@turnkey.to wrote:
#IIF(myvar eq 1, DE(true), DE(false))#
Actually you can get a little bit cleaner than this even:
#iif(myvar,true,false
cleaner than this even:
#iif(myvar,true,false)#
True and false don't need the DE wrappers because they're boolean values,
so they evaluate to themselves and then as long as myvar is a boolean,
you don't have to explicitly compare it to 1 (although you can if you like).
--
s. isaac
I just tripped over something a little strange ...
cfset bitPublish = 255
With EQbr
cfif bitPublish EQ true
true
cfelse
false
/cfif
brbr
Without EQbr
cfif bitPublish
true
cfelse
false
/cfif
If you run this test code on CFMX 6.1, you'll see that the first case evaluates to
false and the second
boolean is the
more strict type, so both of your expressions would be true.
Cheers,
barneyb
-Original Message-
From: Nando [mailto:[EMAIL PROTECTED]
Sent: Friday, February 13, 2004 11:25 AM
To: CF-Talk
Subject: Strange inconsistancy evaluating True/False
I just tripped over
I think what's happening is that CF is storing the constant true as 1,
and 255 != 1 (obviously).
In the second instance, false == 0, and 255 != 0, so 255 is true
(because in most languages, not false is true enough).
Try changing eq true to neq false and see what happens.
--Ben Doom
Nando
This is just a guess as only the source can tell you but:
On Fri, 2004-02-13 at 11:24, Nando wrote:
I just tripped over something a little strange ...
cfset bitPublish = 255
With EQbr
cfif bitPublish EQ true
This would seem to be saying is a (byte, short, int, float) equal to a
boolean
Why is it loosly typed on one hand, but strongly typed on the other?
You wouldn't say weakly typed or tightly typed (unless you're me, and
can't remember the right term).Anyone know the reason for the
inconsistency?Historical trivial is always fun, at least to me.
Cheers,
barneyb
[Todays
evaluating True/False
Ah, the wonders of weakly-typed languages.Not to mention the 50/50
languages like CF.;)
Save yourself a world of troubles, treat CF as if it's strongly typed.CFIF
only accepts boolean conditions (your 'bitPublish' is not a boolean), and
only compare like types (with some fudge
13, 2004 8:42 PM
To: CF-Talk
Subject: RE: Strange inconsistancy evaluating True/False
Ah, the wonders of weakly-typed languages.Not to mention the 50/50
languages like CF.;)
Save yourself a world of troubles, treat CF as if it's strongly typed.CFIF
only accepts boolean conditions (your
Implement mySQL, call it a SQL server, charge them $3000
for support, and take a nice vacation!
And make sure that vacation is in a country where they won't extradite for
criminal database negligence, when they find out the hard way that the
database can't insure data integrity during
You really shouldn't use MS Access with Cold Fusion... (it's probably a
given that this is true, but with California State budget cuts, it'll be a
while before we save up enough pennies to buy anything better)
If you do use MS Access, you should set CF's threads to 1: T/F?
If you do use MS
You really shouldn't use MS Access with Cold Fusion... (it's probably a
given that this is true, but with California State budget cuts, it'll be a
while before we save up enough pennies to buy anything better)
What about MySQL? It's still Free to my knowledge... You may want to look
into
-Talk
Subject: MS Access: True/False Questions
You really shouldn't use MS Access with Cold Fusion... (it's probably a
given that this is true, but with California State budget cuts, it'll be a
while before we save up enough pennies to buy anything better)
If you do use MS Access, you should
Actually CF may be multi-threaded but Access is not. If you have CF threads
set to three it makes no difference since any concurrent requests are queued
up by the Access driver.
+
~~
Structure your ColdFusion code with Fusebox. Get the official
You really shouldn't use MS Access with Cold Fusion...
(it's probably a
given that this is true, but with California State budget
cuts, it'll be a
while before we save up enough pennies to buy anything better)
What about MySQL? It's still Free to my knowledge... You
may want to
, December 05, 2001 4:55 PM
To: CF-Talk
Subject: RE: MS Access: True/False Questions
You really shouldn't use MS Access with Cold Fusion...
(it's probably a
given that this is true, but with California State budget
cuts, it'll be a
while before we save up enough pennies to buy anything
503.221.9860 ext. 111
http://isitedesign.com
**
-Original Message-
From: Brian Fox [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 05, 2001 3:55 PM
To: CF-Talk
Subject: RE: MS Access: True/False Questions
You really
Implement mySQL, call it a SQL server, charge them $3000 for support,
and take a nice vacation!
Kevin
[EMAIL PROTECTED] 12/05/01 03:54PM
You really shouldn't use MS Access with Cold Fusion...
(it's probably a
given that this is true, but with California State budget
cuts, it'll be a
Subject: RE: MS Access: True/False Questions
What about MySQL? It's still Free to my knowledge... You
may want to look
into this.
It'd be a hard sell for us. The decision makers tend to cringe whenever
they can't add a $3000 support package. Freeware is frowned upon,
although
we did
First IANAL (nor have I actually read the GPL in a long time), but the way
I understand it. They are completely within their rights to sell a
closed-source version of their software if they wish to do so. Them
releasing a GPL'd (is it GPL'd?) version does not in any way prohibit them
from
Sleeman [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Wednesday, December 05, 2001 8:12 PM
Subject: Re: MS Access: True/False Questions
First IANAL (nor have I actually read the GPL in a long time), but the way
I understand it. They are completely within their rights to sell a
closed-source
When comparing against Access, its hard to go anywhere but up from where you are now.
Access may have a nice front-end client, but... well, you can fill in the blanks on
performance, I'm sure.
mySQL may be just one step up the food chain, but its a significant step from where
you are now.
: RE: MS Access: True/False Questions
You really shouldn't use MS Access with Cold Fusion...
(it's probably a
given that this is true, but with California State budget
cuts, it'll be a
while before we save up enough pennies to buy anything better)
What about MySQL? It's still
It seems that people are very quick to suggest MySQL but I think the
superior open source database is PostgreSQL, mainly because it
supports transaction locking and stored procedures.
Right, don't forget that MySQL doesn't have any kind of referential
integrity or check constrains too.
For
33 matches
Mail list logo