ColdFusion
  Home arrow ColdFusion arrow Page 4 - What You Must Know About Operators in Cold...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
COLDFUSION

What You Must Know About Operators in ColdFusion!
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 9
    2005-08-22

    Table of Contents:
  • What You Must Know About Operators in ColdFusion!
  • Conditional Operators
  • Logical Operators
  • String Operator

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    What You Must Know About Operators in ColdFusion! - String Operator


    (Page 4 of 4 )

    ColdFusion has only one string (&) operator to contend with, unlike JavaScript which uses both & and + for string concatenation.

    Operator Description Examples
    & joins two pieces of text #x# & #y#
    Example of usage
    <cfscript>
    firstName="James";
    lastName="Bond";
    WriteOutput("The first name is: " & #firstName#);
    Writeoutput("<p></p>");
    WriteOutput("The last name is: " & #lastName#);
    Writeoutput("<p></p>");
    writeOutput("The full name is: " & #firstName# & " " & #lastName#);
    </cfscript>
    

    Concatenated String:

    Summary

    A thorough understanding of the operators is essential for correctly combining smaller expressions to produce larger ones. While evaluating logical values, the outcome may come out as YES or NO, but the interpreter may not recognize it, resulting in a runtime error with a message saying variable 'YES' or 'NO' not found. You will be required to define 'YES' and 'NO' to be associated with 'TRUE' and 'FALSE'. This can be easily verified by commenting out the definitions of 'YES' and 'NO' in logical2.cfm. Also, care should be taken to pay attention to the precedence of operators for correct interpretation. The function evaluate(), introduced without much of an explanation, is a very useful function. It parses and evaluates the expression supplied as an argument, at run time.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · Sitting at an undetermined distance from the readers, the single, most important...
     

    COLDFUSION ARTICLES

    - Adobe ColdFusion Just Got More RAD
    - How to Access a SQL Anywhere Database with C...
    - CFXML: Probing XMLDOM in ColdFusion
    - Creating a Web Service with ColdFusion: the ...
    - CFAjax: What it is and How to Use it
    - Querying SQL 2000 Server from ColdFusion
    - Introduction to ColdFusion Markup Language, ...
    - Introduction to ColdFusion Markup Language
    - Databases and Dreamweaver MX 2004, concluded
    - Databases and Dreamweaver MX 2004
    - Welcome to Coldfusion MX 6.1, concluded
    - Welcome to Coldfusion MX 6.1
    - What You Must Know About ColdFusion Flow-Con...
    - What You Must Know About Operators in ColdFu...
    - Everything You Must Know About ColdFusion Va...







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    Stay green...Green IT