>
> it should not be difficult to directly generate a double value
You'd think so, but read these stunning strtod() algorithm descriptions (a
must-read for anyone who likes math).
https://www.exploringbinary.com/how-strtod-works-and-sometimes-doesnt/
Rick is right I guess, see result from "LC_NUMERIC=C rexx osmmap.rex"
---
ruurd@Paradigit2:~/newrxgtk/GTKv3/test$ LC_NUMERIC=C rexx osmmap.rex
As CSTRINGs - Latitude: 52.289875;Longitude: 4.8448525
As objects -
On Mon, Apr 19, 2021 at 5:09 PM Erich Steinböck
wrote:
> Hi Ruurd, instead of defining your latitude/longitude arguments as CSTRING
> and then manually converting them, you can define your arguments as (e. g.)
> float and have Rexx do the conversion for you.
>
> ~~~
> float lat, // Latitude
Hi Ruurd, instead of defining your latitude/longitude arguments as CSTRING
and then manually converting them, you can define your arguments as (e. g.)
float and have Rexx do the conversion for you.
~~~
float lat, // Latitude in decimal degrees
float lon, // Longitude in decimal degrees
I guess I found the cause. It's the decimal point vs the decimal comma
(for my locale) that is causing the behaviour.
If I set the latitude and longitude in an ENVIRONMENT variable via VALUE
and retrieve those with GObject "g_getenv" function, then all goes well
if I use the comma as decimal
In the real code the tildes in the printf as objects are "->". Made a
mistake when I type the code manually.
On 4/19/21 3:50 PM, Ruurd Idenburg wrote:
Given the following code:
/**
* Method: OsmMapPointNew
*
* Create a new OsmMapPoint.
*
* @return 0
**/
RexxMethod3(int,