Last active
December 11, 2015 13:08
-
-
Save roulupen/4605443 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
//function defined in cfm page which will add two number and will return the value | |
function addTwoNumber(num1, num2) { | |
return num1 + num2; | |
} | |
varriable.x = variables.addTwoNumber; //Function defined in this page is assigned to the variable x | |
writeOutPut("Call to addTwoNumber : " & varriable.x(10,12)); //Function call to AddTwoNumber by using variable | |
variables.y = createObject("component", "test").addTwoNum; // Function defined in test.cfc is assigned to variable y | |
writeOutPut("<br/>Call to addTwoNum :" & variables.y(10,20)); //Function call to addTwoNum by using variable | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment