[fdo-internals] New RFC posted

Thomas Knoell thomas.knoell at autodesk.com
Wed Aug 22 13:23:27 EDT 2007


Hi Jason

 

For functions like MOD and REMAINDER, the intent is to use the same data
type for the return value as used for the first parameter. In some
cases, this is not possible and hence the return type is different. For
example, look at the signatures for the function MOD where the first
parameter is an int16 and the second parameter either a decimal, double,
int16, int32, int64 or single data type. In this example, the return
value differs based on the provided values:

 

Signature
Return Value Data Type

------------------------------------------------------------------------
--------------------------------------------------

Mod (FdoDataType_Int16, FdoDataType_Decimal)
FdoDataType_Double

Mod (FdoDataType_Int16, FdoDataType_Double)
FdoDataType_Double

Mod (FdoDataType_Int16, FdoDataType_Int16)
FdoDataType_Int16

Mod (FdoDataType_Int16, FdoDataType_Int32)
FdoDataType_Int16

Mod (FdoDataType_Int16, FdoDataType_Int64)
FdoDataType_Int16

Mod (FdoDataType_Int16, FdoDataType_Single)
FdoDataType_Single

 

Does that answer your question?

 

Thanks

 

  Thomas

 

 

From: fdo-internals-bounces at lists.osgeo.org
[mailto:fdo-internals-bounces at lists.osgeo.org] On Behalf Of Jason Birch
Sent: Tuesday, August 21, 2007 7:21 PM
To: FDO Internals Mail List
Subject: RE: [fdo-internals] New RFC posted

 

Me too

 

J

 

From: fdo-internals-bounces at lists.osgeo.org
[mailto:fdo-internals-bounces at lists.osgeo.org] On Behalf Of Jason Birch
Sent: Tuesday, August 21, 2007 5:54 PM
To: FDO Internals Mail List
Subject: RE: [fdo-internals] New RFC posted

 

- Would it be possible to add an integer DIV function as well?  Or is
this just assumed when dividing integer values?  Showing some ignorance
of FDO operations here...

 

[tok] I don't think we need this function. If you want the result of a
division of two integers to be an integer value, you could use the FLOOR
or CEIL function to achieve this.

 

[jcb]  OK.  I guess this question stemmed from the result type on the
MOD/REMAINDER functions being diff_rv, assuming that the return type
would be based on the input parameters.  Could you maybe clarify under
what cases various types are returned from these functions?

 

Am I getting annoying yet? :)

 

[tok] No.

 

[jcb] Guess I'll have to try harder then...

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/fdo-internals/attachments/20070822/f0f3aa19/attachment.html


More information about the fdo-internals mailing list