portal entry

select a category, or use search below
(searches all categories and all time range)
Title:

Writing CFMs without Semicolons

| View in Portal
July 12, 2018 08:39:17 AM GMT
2 Comments
Semi-colons have been statement separators for most programming languages. Earlier when processing was slow and memory was expensive, language designers needed to split programs into multiple statements. A few languages required each statement to be on a new line so that the carriage return acted as a delimiter. Some languages required a free format text layout as a separator. Thus, the semi-colon was chosen as a separator so that it doesn’t conflict with other characters, for example, operators for math operations. Many languages do not use semi-colons as statement separator, for […]
Labels: Adobe ColdFusion, Adobe ColdFusion 2018, Blog, ColdFusion, CFML, coldfusion 2018, semicolon

Comments:

Your include example requiring semicolons makes no sense. include "blah.cfm" writeoutput("test") is totally clear as the speach marks indicate the file names. If you really wanted to include a file called "blah.cfm" writeoutput("test" then you'd need to escape the marks, just link in any other string.
Comment by Tom Chiverton
1172 | July 13, 2018 09:39:05 AM GMT
Thanks Tom for the feedback, i have added a more appropriate use-case which shows a scenario where semicolons can be used to avoid the ambiguity.
Comment by Ashudeep Sharma
1188 | July 16, 2018 07:16:57 AM GMT