TechArena Community

TechArena Community (http://forums.techarena.in/)
-   Software Development (http://forums.techarena.in/software-development/)
-   -   What are the Elements of Coldfusion Expressions (http://forums.techarena.in/software-development/1150693.htm)

Demetrius 30-03-2009 10:42 AM

What are the Elements of Coldfusion Expressions
 
hie,,

I hope many of you are aware about the coldfusion - a tag based programming language that allows database access for web server.
I want to know what are the elements of coldfusion expressions ?
Can anybody provide me the information about the same... thnx

Praetor 30-03-2009 10:49 AM

Re: What are the Elements of Coldfusion Expressions
 
Elements of Coldfusion Expressions

ColdFusion expressions consist of operands and operators.
Operands are comprised of constants and variables.
Operators are the verbs that act on the operands; functions are a form of operator.

Operands : DataTypes, Constant, Variables
- Data types of ColdFusion operands
- ColdFusion constants
- ColdFusion variables: naming conventions, kinds of variables, scoping, and other relevant details

Modifier 30-03-2009 10:52 AM

Re: What are the Elements of Coldfusion Expressions
 
Data Types of Constants and Variables

In ColdFusion, constants and variables have implied data types. The reason for the term "implied" is that there are no variable declarations that define the scalar data type of a variable as one finds in statically typed languages such as Pascal. Whenever you use a constant or set the value of a variable, the value you use has a type, be it integer, real, or string.

Constants

Constants are simple scalar values that you can use within expressions and functions. They include integers, real numbers, time and date values, boolean values, string values, and lists. Constants do not include more complex values, such as structures and arrays, because arrays and structures are created as variables.

Variables

Variables are the most frequently used operands. Unlike constants, which always have the same value, their values can be set and reset, passed as attributes to CFML tags and JRun servlets. Like constants, they can also be passed as parameters to functions, and can replace most constants.

Modifier 30-03-2009 10:57 AM

Re: What are the Elements of Coldfusion Expressions
 
Datatypes

Integers -
Numbers with no decimal point. Integers have both a lower and an upper limit.
The lower limit for a signed integer is -2,147,483,648
The upper limit for a signed integer is 2,147,483,647.

If you specify an integer that exceeds the upper or lower limit, ColdFusion converts the number to a floating point value to avoid overflow. In doing so, ColdFusion preserves the number's magnitude. However, the conversion to floating point comes at the expense of precision, since ColdFusion has only a fixed number of bits to work with.

Real numbers -
Numbers with a decimal part. Also known as floating point numbers.
The range of ColdFusion numbers is approximately ?10300, or ?1 with 300 zeros after it. Most operations are accurate to 12 digits after the decimal point.
ColdFusion supports scientific notation; this means that you can enter numbers in the form 3 E 16 and perform calculations.

Strings -
Text values, which can be enclosed in single (') or double (") quotes. Strings length is limited only by the amount of available memory on the ColdFusion server.
To use a single quote inside a string that is single quoted, escape the single quote by using two single quotes. You can similarly escape a double quote inside a double quote-enclosed string. For example:
"the ""techarena"" community"


All times are GMT +5.5. The time now is 11:51 AM.