company logo

Value :: toDouble - Convert value to floating value

The function returns the value as double value.

When no instance is selected or the value cannot be converted into a numeric value, the function throws an exception.

Return value:  Double value ( double  )

Implementation overview

Implementation details

  1. Get double value from current value
    double Value  :: toDouble (  )

    The function returns the double (floating) value from current value handle.

  2. to list
  3. Get double value for passed property
    double Value  :: toDouble ( odaba::String &vAccessPath )

    The function returns the double value for the property with the name passed in vSimplePath. When no property exists with the passed name the function throws an exception.

    This is a short form for value(vSimplePath).toDouble().

    • vAccessPath - Access path

      An access path may simply refer to an extent or property, but also to a calculated result. Thus, an access path may contain just a name, but also a sequence of path elements separated by '.' in order to refer to far properties or complex operations.

      The access path may start with two dots (.), which indicates, that the path starts in an upper property handle. One dot indicates, that the path starts in the current property handle. This distinction becomes necessary, when a property has the same name as an extent. To access a property in this case, one dot must precede the property name. The first dot can be omitted, when the property name is not an extent name.

      Forcing to a path to start in a parent property handle requires two dots (..), the parents parent three and so on.

      In order to pass no access path, an empty string ( String() ) has to be passed.

      address.street      // property path

      .address.street     // property path

      ..address.street    // address in parent property instance

      children(0).Age()   // operation path

      Person().children() // path property

      children('Anton')   // path property

  4. to list