tracker issue : CF-4126716

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

write() and writeLine()

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/AsDesigned

Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)

Created: 03/09/2016

Components: CLI

Versions: 2016

Failure Type: Enhancement Request

Found In Build/Fixed In Build: Alpha_v12 /

Priority/Frequency: Minor / Unknown

Locale/System: English / Win All

Vote Count: 1

These are the same as other same- / similar-named functions in other languages.

write() - outputs text
writeLine() - outputs a LINE of text (with a line terminator)

I know CFML already has writeOutput(), but in CLI stuff it's customary to have these pair of functions. It's just a shame you didn't simply call writeOutput() write(), I guess.

It does NOT make sense to have: writeLine() and writeOutput(). There needs to be a distinction in the names between the two functions that one emits a line, one just emits some text.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	4126716

External Customer Info:
External Company: Straker Interactive
External Customer Name: Adam Cameron
External Customer Email: CAMERON.ADAM@GMAIL.COM
External Test Config:

Attachments:

Comments:

Adding BUG AUDIT TRAIL ********action: updated fieldName: Closed By newValue: hkallae oldValue: Blank oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-08-24 06:02:05.0 action: updated fieldName: Date Closed newValue: 2015-08-23 23:02:05.0 oldValue: Blank oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-08-24 06:02:05.0 action: updated fieldName: Owner newValue: Blank oldValue: hkallae oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-08-24 06:02:05.0 action: updated fieldName: Status newValue: Withdrawn oldValue: ToTrack oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-08-24 06:02:05.0 action: updated fieldName: State newValue: Closed oldValue: Open oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-08-24 06:02:05.0 action: updated fieldName: Reason newValue: AsDesigned oldValue: PRHaveInfo oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-08-24 06:02:05.0 action: updated fieldName: Reason newValue: PRHaveInfo oldValue: PRNeedInfo oprid: prerelease recordName: RQ_DEFECT timpestamp: 2015-08-24 05:55:33.0 action: updated fieldName: State newValue: Open oldValue: Open oprid: prerelease recordName: RQ_DEFECT timpestamp: 2015-08-24 05:55:33.0 action: updated fieldName: Status newValue: ToTrack oldValue: ToTrack oprid: prerelease recordName: RQ_DEFECT timpestamp: 2015-08-24 05:55:33.0 action: updated fieldName: Reason newValue: PRNeedInfo oldValue: Contested oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-08-24 04:07:51.0 action: updated fieldName: Status newValue: ToTrack oldValue: ToTest oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-08-24 04:07:51.0 action: updated fieldName: Reason newValue: Contested oldValue: Blank oprid: himar recordName: RQ_DEFECT timpestamp: 2015-08-20 09:32:53.0 action: updated fieldName: Status newValue: ToTest oldValue: ToFix oprid: himar recordName: RQ_DEFECT timpestamp: 2015-08-20 09:32:53.0 action: updated fieldName: Owner newValue: hkallae oldValue: himar oprid: himar recordName: RQ_DEFECT timpestamp: 2015-08-20 09:32:53.0 action: updated fieldName: Reason newValue: Blank oldValue: Blank oprid: rukumar recordName: RQ_DEFECT timpestamp: 2015-08-18 14:12:57.0 action: updated fieldName: Status newValue: ToFix oldValue: NeedsReview oprid: rukumar recordName: RQ_DEFECT timpestamp: 2015-08-18 14:12:57.0 action: updated fieldName: Owner newValue: himar oldValue: rukumar oprid: rukumar recordName: RQ_DEFECT timpestamp: 2015-08-18 14:12:57.0 action: updated fieldName: Owner newValue: rukumar oldValue: hkallae oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-07-16 05:41:07.0 action: updated fieldName: Reason newValue: Blank oldValue: Blank oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-07-16 05:41:07.0 action: updated fieldName: Status newValue: NeedsReview oldValue: Unverified oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-07-16 05:41:07.0 action: updated fieldName: Priority newValue: 1 oldValue: 0 oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-07-16 05:41:07.0 action: updated fieldName: Fix By Product Milestone newValue: Beta oldValue: Blank oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-07-16 05:41:07.0 action: updated fieldName: Fix By Milestone newValue: Beta oldValue: Blank oprid: hkallae recordName: RQ_DEFECT timpestamp: 2015-07-16 05:41:07.0 action: added fieldName: Vote Type newValue: BETA oldValue: Blank oprid: prerelease recordName: AD_DEFECT_VOTE timpestamp: 2015-07-14 22:14:52.0
Comment by CFwatson U.
3413 | March 09, 2016 04:45:44 AM GMT
With the advent of CLI, this would be a very valuable addition as people start building CFML scripts. An alternative would be to treat "\n" in strings as a newline character when rendering output to the console from a CLI-invoked script, e.g., <cfscript>writeOutput("Hello\nWorld!");</cfscript> Could produce: Hello World! (instead of the current Hello\nWorld! output)
Vote by External U.
3415 | March 09, 2016 04:45:59 AM GMT
Added By: PreRelease User User Name:Adam Cameron Note Added: sure Date Added :2015-08-24 05:55:32.0 Added By:himar Note Added: May be writeOutput could have been named better. Since write, writeln and writeError are specific to CLI, there shouldn't be any confusion. Date Added :2015-08-19 08:23:51.0 Added By: PreRelease User User Name:Adam Cameron Note Added: Entered Feature. Date Added :2015-07-14 19:39:57.0
Comment by CFwatson U.
3414 | March 09, 2016 04:46:00 AM GMT