Quantcast
Channel: LabWindows/CVI topics
Viewing all articles
Browse latest Browse all 5339

reading negative zero from a string

$
0
0

The code sscanf("-0", "%d", &x) returns -2147483648 (hex 80000000) if x is an integer or long.

 

This is causing a problem in my radar test tool when I try to parse a string containing latitude/longitude coordinates in order to separate it into degrees and minutes.  For example, sscanf("-0:12.34", "%d:%f", &deg, &min) will return -2147483648 for the degrees.

 

I'm using LabWindows 2013/2015 on Windows 7/10.


Viewing all articles
Browse latest Browse all 5339

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>