Subsribe to our RSS

latest reactions

Montana Flynn
haha …
some1
Hi, Thank you for help me testing my sit …
metin2 yang
it is very nice …
Tjarko
I would'nt use cfhtmlhead for anything ; …
Sebastiaan
Hi Tjarko,Would you suggest injecting…

Use OpenDNS

mxna feeds

A Special ColdFusion Builder Event in Tampa, FLColdFusion Contract Job in Marbella, SpainColdFusion Job Opportunity in West London, United KingdomColdFusion Job Opportunity in Bethesda, MDColdFusion Job Opportunity in Springfield, MOColdFusion Job Opportunity in Seattle, WAColdFusion Builder - RefactoringColdFusion Job Opportunity in Raleigh, NCColdFusion Job Opportunity in Quincy, MAColdFusion Job Opportunity in Memphis, TNColdFusion Job Opportunity in San Antonio, TXUsing Base64 Canvas Data In jQuery To Create ColdFusion ImagesMy move from using cfhttp and rssatom.cfc to cffeed.Infinite entities, cfgrid and one cfc to handle the dataJob: ColdFusion Developer - Marbella, Spain

All files are strictly confidential: all information is classified.
© Copyright 2002 - 2010 mximize.com.
All right reserved.

MXNA webfeed

Visit Carlos GallupaPowered by ColdFusion MX

Use NOT or use !, it's all possible

Today I came across a piece of code made by a co-worker and in the 11 years that I use ColdFusion I never knew it was possible.... and i'm guessing that's it's only possible since MX.

The piece of code below works...

<cfset var = 1 />

<cfif !var>
    Do something
</cfif>

To use ! is the same as using NOT in the cfif statement. Pretty darn nice!! Probably old news but for me it was something I never saw anywhere in CF code.

3787 viewed | 8 opinion(s)  | del.icio.us | Digg it | Tjarko @ 22/10/08 17:33 cet


Reactions:

injun #576871 wrote.... (site)

Yeah, I'm using CF about 6 years, and I never knew it was possible too.
Thanks for useful post!

22 October 2008 17:47 cet  

Kevin wrote....

Hi, it's something new in CF8.There are several others that are new like:

i += 1; instead of i = i + 1;
i *= 2; instead of i = i * 2;

&& = AND
|| = OR

There are more too.

22 October 2008 20:26 cet  

Michael Sharman wrote.... (site)

Yep, as Kevin mentioned this is new to CF8 and is something that was sorely missed in the language.

CF8 has lots of nice new language enhancements, check out the new implicit struct and array creation syntax as well.

22 October 2008 22:45 cet  

Ted Danson wrote....

Wow, let's welcome CF to the 90s.Most other languages have been using !, +=, &&, || syntax for years.Way to bring it up to ECMA specs right before EOLing it Adobe.

22 October 2008 23:26 cet  

Chris wrote.... (site)

@Ted Danson,

say, do the other languages offer ways to send an email, do a full text search or a database query with just 1 line of code? If so, welcome to the advantages that ColdFusion developers have had for more than 12 years now.

And about EOLing it... there is a public roadmap for new relaeases until 2011. No talk about EOL for ColdFusion among the well informed people.

23 October 2008 9:26 cet  

jax wrote....

Ted must be a php fan...

Most Ted's are.

24 October 2008 16:44 cet  

Tjarko wrote....

sdf asfdsf dsfsdf dasfdasf

26 November 2008 17:42 cet  

Jax wrote....

Looks like you need to replace the batteries in your keyboard Tjarko.

30 November 2008 0:05 cet  

Leave your comment

Your name


Your url/website/link/email....


Some room for your reaction is placed here..



The answer to the ultimate question is?? (42 ;-))




URL en mail addresses are translated for you... life sometimes is that simple!!