tracker issue : CF-4199859

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

[ANeff] ER for: Numeric member functions

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/Fixed

Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff ()

Created: 10/03/2017

Components: Language, Member Functions

Versions: 2016

Failure Type: Others

Found In Build/Fixed In Build: / 308164(Public Beta)

Priority/Frequency: Normal /

Locale/System: /

Vote Count: 5

This ER is for: Numeric member functions

Numeric data type needs member functions. Suggestions:

//Number functions

{code:java}
someVar.abs()
someVar.aCos()
someVar.aSin()
someVar.atn()
someVar.bitAnd(number2)
someVar.bitMaskClear(start, length)
someVar.bitMaskRead(start, length)
someVar.bitMaskSet(mask, start, length)
someVar.bitNot()
someVar.bitOr(number2)
someVar.bitSHLN(count)
someVar.bitSHRN(count)
someVar.bitXor(number2)
someVar.ceiling()
someVar.cos()
someVar.decrementValue()
someVar.exp()
someVar.fix()
someVar.floor()
someVar.formatBaseN(radix)
someVar.incrementValue()
someVar.int()//DO NOT ADD. Adobe recommends Floor, instead of Int, in new applications.
someVar.log()
someVar.log10()
someVar.max(number2)
someVar.min(number2)
someVar.pi()//Doesn't make sense as a member function.. does it?
someVar.precisionEvaluate()//Useful for creating an instance of BigDecimal*, if someNumber.precisionEvaluate() is shortcut for precisionEvaluate(someNumber)
someVar.rand([algorithm])//Doesn't make sense as a member function.. does it?
someVar.randomize([algorithm])
someVar.randRange(number2[, algorithm])
someVar.round()
someVar.sgn()
someVar.sin()
someVar.sqr()
someVar.tan()
{code}


//Decision functions (these should probably be added to all data types?)

{code:java}
someVar.isArray()
someVar.isBinary()
someVar.isBoolean()
someVar.isClosure
someVar.isCustomFunction()
someVar.isDate()
someVar.isDateObject()
someVar.isDateObject()
someVar.isDDX()
someVar.isImage()
someVar.isFile()
someVar.isJSON()
someVar.isLeapYear()
someVar.isLocalhost()
someVar.isNumeric()
someVar.isObject()
someVar.isQuery()
someVar.isSimpleValue()
someVar.isSpreadsheetFile()
someVar.isSpreadsheetObject()
someVar.isStruct()
someVar.isValid()
someVar.isWDDX()
someVar.isXML()
someVar.isXMLAttribute()
someVar.isXMLDoc()
someVar.isXMLElem()
someVar.isXMLNode()
someVar.isXMLRoot()
someVar.lsIsCurrency()
someVar.lsIsDate()
someVar.lsIsNumeric()
{code}


//Conversion functions

{code:java}
someVar.toString()
someVar.toDate() //ToDate() needs added to language (as does ToNumber())
{code}


//Formatting functions

{code:java}
someVar.booleanFormat()
someVar.decimalFormat()
someVar.dollarFormat()
someVar.lsNumberFormat()
someVar.numberFormat()
someVar.yesNoFormat()
{code}


//Additional functions

{code:java}
someVar.chr()
someVar.createDateTime([month[, day[, hour[, minute[, second]]]]])//CF-3374275 added support for createDateTime(year)
someVar.duplicate()
someVar.monthAsString([locale])
someVar.val()
{code}


* - Related URL (see precisionEvaluate() above): https://www.bennadel.com/blog/2044-using-coldfusion-s-precisionevaluate-function-to-perform-big-integer-math.htm (comment from Ben Nadel on Oct 27, 2010 at 10:21 AM)

Attachments:

Comments:

Don't agree with a lot of the decision functions being appropriate, but yes to the others. some thought needs to go into ones like createDateTime. Probably a static method on the DateTime class or something? Not all of these functions are appropriate as object methods, but could be class methods.
Comment by Adam C.
263 | October 03, 2017 08:13:52 AM GMT
Hi Adobe, someVar.numberFormat() should've been someVar.format() The type-specific 'format' functions don't need the type suffix. Ex: myDate.format() instead of myDate.dateTimeFormat() myNumber.format() instead of myNumber.numberFormat() Thanks!, -Aaron
Comment by Aaron N.
264 | October 03, 2017 01:21:52 PM GMT
Hi Adobe, I see this ticket is marked "ToTest". Are all the member functions being added, or only certain ones under the "//Number functions" section? Could you please let us know which ones you're adding or not adding? Thanks!, -Aaron
Comment by Aaron N.
27260 | April 01, 2018 06:44:10 AM GMT
We have supported Numeric Member Functions . We have separate bugs for decision & formatting functions. Hence , closing this bug.
Comment by Suchika S.
27544 | April 17, 2018 08:48:41 AM GMT
Hi Suchika, CF-4200186 covered numeric member functions. That is closed/fixed. Good. What is the ticket covering all decision functions. Likewise, what is the ticket covering all formatting functions? And all conversion functions. And also the "additional" functions listed in this ticket. I don't see such tickets. I see individual tickets for individual functions. But not any tickets for all decision, or formatting, or.. What are these all-encompassing tickets? If there aren't any, then can this ticket please be re-opened? Thanks!, -Aaron
Comment by Aaron N.
27545 | April 25, 2018 06:52:18 AM GMT
Thanks for the follow-up BTW. I just don't see the tickets you're referring to. Hoping those tickets can be listed here, or this ticket can be re-opened? Thanks!, -Aaron
Comment by Aaron N.
27546 | April 25, 2018 06:53:45 AM GMT