Gda.Numeric

Fields

Name

Type

Access

Description

number

str

r/w

a string representing a number

precision

int

r/w

precision to use when number is converted (not implemented jet)

reserved

object

r

width

int

r/w

not implemented jet

Methods

class

new ()

copy ()

free ()

get_double ()

get_precision ()

get_string ()

get_width ()

set_double (number)

set_from_string (str)

set_precision (precision)

set_width (width)

Details

class Gda.Numeric

Holds numbers represented as strings.

This struct must be considered as opaque. Any access to its members must use its accessors added since version 5.0.2.

classmethod new()
Returns:

a new Gda.Numeric.

Return type:

Gda.Numeric

Creates a new Gda.Numeric with defaults.

New in version 5.0.2.

copy()
Returns:

a newly allocated Gda.Numeric which contains a copy of information in boxed.

Free-function: Gda.Numeric.free

Return type:

Gda.Numeric

Creates a new Gda.Numeric structure from an existing one.

free()

Deallocates all memory associated to the given boxed

get_double()
Returns:

a float representation of self

Return type:

float

New in version 5.0.2.

get_precision()
Returns:

an integer with the precision of a Gda.Numeric.

Return type:

int

Gets the precision of a Gda.Numeric.

New in version 5.0.2.

get_string()
Returns:

a new string representing the stored valued in self

Return type:

str or None

Get the string representation of self, in the C locale format (dot as a fraction separator).

New in version 5.0.2.

get_width()
Returns:

an integer with the width of a Gda.Numeric. (Not jet implemented).

Return type:

int

Gets the width of a Gda.Numeric. (Not yet implemented).

New in version 5.0.2.

set_double(number)
Parameters:

number (float) – a float

Sets self using a float represented by number.

New in version 5.0.2.

set_from_string(str)
Parameters:

str (str) – a string representing a number, in the C locale format

Sets self with a number represented by str, in the C locale format (dot as a fraction separator).

New in version 5.0.2.

set_precision(precision)
Parameters:

precision (int) – a int

Sets the precision of a Gda.Numeric.

New in version 5.0.2.

set_width(width)
Parameters:

width (int) – a int

Sets the width of a Gda.Numeric. (Not yet implemented).

New in version 5.0.2.