Class Reference
%Library.Float
Server:irisdocs1
Instance:IRISLATEST
User:UnknownUser
 
-
  [%SYS] >  [%Library] >  [Float]
Private  Storage

datatype class %Library.Float extends %DataType

ODBC Type: DOUBLE

This class is DEPRECATED. Applications should use either the %Double datatype for cases where values should be in the IEEE float ($Double) format, or %Decimal for cases where values should be in Decimal ($Decimal) format.

The %Float data type class represents a floating point number.

The logical value of the %Float data type is a floating point value.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
8 6


Summary

Methods
DisplayToLogical IsValid LogicalToDisplay LogicalToJSON
Normalize XSDToLogical

Subclasses
%xsd.float

Parameters

• parameter DISPLAYLIST;
Used for enumerated (multiple-choice) attributes. Used in conjunction with the VALUELIST parameter for enumerated (multiple-choice) attributes. DISPLAYLIST, if not null, represents the display values for the attribute corresponding with the logical values listed in VALUELIST.

The display values are returned by the LogicalToDisplay method.

• parameter FORMAT;
The format specification for the data type's display value.

The value of FORMAT corresponds to the formatting option of the $FNUMBER function, which is used to perform the formatting.

• parameter JSONTYPE = "number";
• parameter MAXVAL;
The maximum allowed logical value for the data type.
• parameter MINVAL;
The minimum allowed logical value for the data type.
• parameter SCALE;
The scale value (number of digits following the decimal point) for this data type. This parameter only affects the display value which will be rounded to the specified number of decimal places.
• parameter VALUELIST;
Used for enumerated (multiple-choice) attributes. VALUELIST is either a null string ("") or a delimiter separated list (where the delimiter is the first character) of logical values. If a non-null value is present, then the attribute is restricted to values in the list, and the validation code simply checks to see if the value is in the list.
• parameter XSDTYPE = "double";
Declares the XSD type used when projecting XML Schemas.

Methods

• classmethod DisplayToLogical(%val As %String) as %Float
Converts the input value %val, which is a string representing a floating point value, into a logical floating point value.

Returns the logical floating point value of the input string %val.

• classmethod IsValid(%val As %RawString) as %Status
Tests if the logical value %val, which is a floating point value, is valid. The validation is based on the class parameter settings used for the class attribute this data type is associated with. In this case, MAXVAL and MINVAL.
• classmethod LogicalToDisplay(%val As %Float) as %String
Converts the value of %val, which is in logical floating point format, into a display string. The formatting is based on the value of the FORMAT parameter.

Returns the formatted value of %val.

• classmethod LogicalToJSON(%val As %Float) as %String
Converts the Objectscript value to the JSON number value.
• classmethod Normalize(%val As %RawString) as %Float
Converts %val to a normalized value.
• classmethod XSDToLogical(%val As %String) as %Float
Converts the SOAP encoded input decimal value into a logical value. Returns "" for error.


Copyright (c) 2019 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.