On this page, which documents components <https://...
# documentation
b
On this page, which documents components https://helpx.adobe.com/coldfusion/developing-applications/building-blocks-of-coldfu[…]ing-coldfusion-components/creating-coldfusion-components.html it says the following
• You use the cffunction tag to define CFC methods. The CFScript function statement can create simple methods, but it does not provide options to control access to the method, provide metadata, specify a return type, or control generated output.
But that doesn't seem correct. I do
Copy code
public String function( arg ) metadata="oh, yeah" outpout=false {
}
all the time in script.
👍 3
d
Yeah that's wrong.
a
you don't need the
output
though do you - it's false by default in cfscript
b
@aliaspooryorik Actually, that's not true 🙂
output is true in script and tags alike
The difference is that whitespace does not generate output in script
But
Copy code
echo('foo')
will totally create output in script unless output is turned off
a
ah - yeah, OK, the end result is no whitespace unless you explicity output it.
Fair point though I was thinking of the result rather than the actual implimentation, but you are correct.
b
Now, it is generally worthless to specify since you'd have to go out of your way to explicitly create output in script, so it doesn't happen on accident like tags, unless I guess you had debugging output you wanted to turn off easily.
👍 1
I only included it to show it's possible since Adobe's docs mentioned "_control generated output_"
1
a
although you did mention
outpout
😛
😅 1
b
That my favorite way to type it 😉
😁 1
I can't edit it now that the message is too old eye roll
a
The many times I type
numberic
instead of
numeric
1
b
oh my gosh-- ALL THE TIME!
🙃 1
@saghosh
@saghosh?