Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
SilentBob'secretfusion #1
not (true) not (false)
I am having a major brain block. I am reviewing this code and am getting my
logic confused.
This is the code:
<cfif (not refind("\d{3}-\d{3}-\d{4}",form.destinationaddress)) and (not
refind("\d{10}",form.destinationaddress)) >
is this correct?
not(f) and not(f) eq t
not(t) and not(t) eq f
not(f) and not(t) eq t ?
Thanks.
SilentBob'secretfusion Guest
-
True or False and why?
(Contribute CS3 for Windows) A brand new Contributor user gets an account on a web server. There are no files in the directory (no index.htm,... -
cfselect and true/false instead of 1/0
Hi, can any one tell me why does it return the text true and false instead of 1 and 0 for a BIT column of a table from MS SQL Server. I have CFMX... -
format true/false
Hi Webform; bound datagrid. My boolean column shows TRUE or FALSE. I'd rather have a checkbox. How to format please? Thanks Graeme -
MSSQL True/False values
I'm lost at the moment. I have a SQL database that has fields with bit datatypes. This database originated from an Access database and the bit... -
Theory Question: True & False
you sure ! -
basky #2
Re: not (true) not (false)
I would just change
not(f) and not(t) eq t ?
to
not(f) and not(t) eq f ?
not(f) = true
not(t) = false
t and f = false (1 and 0 = 0)
basky Guest
-
OldCFer #3
Re: not (true) not (false)
It's:
not(f) and not(f) eq t
not(t) and not(t) eq f
not(f) and not(t) eq f
OldCFer Guest
-
Adam Cameron #4
Re: not (true) not (false)
Change the logic to be:
if (not (expr1 and expr2));
It's a lot clearer.
I have heard - and certainly believe from my own experience - that humans
struggle with NOTness. So best to minimise the instances of having to do
it :-)
--
Adam
Adam Cameron Guest
-
Adam Cameron #5
Re: not (true) not (false)
Or better yet:
<cfif not refind("\d{3}(-?)\d{3}\1\d{4}",form.destinationaddress)>
--
Adam
Adam Cameron Guest



Reply With Quote

