ColdFusion Variables are typeless
TypelessVariables.cfm
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ColdFusion Variables are typeless - how to test variables typeless feature</title>
</head>
<body>
<h2 style="color:SeaGreen; font-style:italic">ColdFusion Variables are typeless example: how to verify</h2>
<hr width="600" align="left" color="DarkSeaGreen" />
<br />
<cfset TestNumber=5>
<cfset TestString="20">
<cfset SampleMath=TestNumber*TestString>
<cfset SampleString="First Number: " & TestNumber & " Second Number: " & TestString>
<table border="0" cellpadding="2" cellspacing="2" bgcolor="OrangeRed">
<tr style="background-color:Crimson; color:Snow; font-size:large;">
<td>Variable=Value</td>
<td>Output</td>
</tr>
<cfoutput>
<tr style="background-color:HotPink; color:Snow;">
<td>TestNumber=5</td>
<td>#TestNumber#</td>
</tr>
<tr style="background-color:HotPink; color:Snow;">
<td>TestString="20"</td>
<td>#TestString#</td>
</tr>
<tr style="background-color:HotPink; color:Snow;">
<td>SampleMath=TestNumber*TestString</td>
<td>#SampleMath#</td>
</tr>
<tr style="background-color:HotPink; color:Snow;">
<td>SampleString="First Number: " & TestNumber & " Second Number: " & TestString</td>
<td>#SampleString#</td>
</tr>
</cfoutput>
</table>
</body>
</html>
- CFMAP - Generate an earth type google map in ColdFusion
- CFMAP - How to change google map marker color in ColdFusion
- ColdFusion CFscript - Invoke a component in script
- cfqueryparam- how to use cfqueryparam in cfquery tag
- How to use cfsqltype in cfqueryparam tag in ColdFusion
- How to use NEQ operator in cfif condition in ColdFusion
- ColdFusion - How to use IS NOT operator in cfif conditional processing
- How to use variable prefixes in ColdFusion
- ColdFusion number and date format mask
- ColdFusion dynamic variables