Re: [Oorexx-devel] Problem? with OORexx API function ObjectToDouble

2021-04-19 Thread Ruurd Idenburg
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, 

[Oorexx-devel] Problem? with OORexx API function ObjectToDouble

2021-04-19 Thread Ruurd Idenburg
Given the following code: /**  * Method: OsmMapPointNew  *  * Create a new OsmMapPoint.  *  * @return 0  **/ RexxMethod3(int,    // Return type     OsmMapPointNew, // Method name     CSTRING, lat,   // Latitude in decimal degrees    

Re: [Oorexx-devel] Problem? with OORexx API function ObjectToDouble

2021-04-19 Thread Ruurd Idenburg
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

Re: [Oorexx-devel] Problem? with OORexx API function ObjectToDouble

2021-04-19 Thread Erich Steinböck
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

Re: [Oorexx-devel] Problem? with OORexx API function ObjectToDouble

2021-04-19 Thread Rick McGuire
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