On mercredi 6 juin 2018 19:27:50 CEST Martin Landa wrote: > Hi, > > 2018-06-05 11:16 GMT+02:00 Even Rouault <[email protected]>: > > For >= 19 characters, bigint cannot be used indeed. There isn't much other > > choice than storing as a string. > > right. In [1] I switched at least to CPLAtoGIntBigEx(). BTW I would > expect that a warning will be printed also on invalid character. But > > * 7423849274x is silently parsed as 7423849274 > * x7423849274 is silently parsed as 0 > > Is it expected behaviour of CPLAtoGIntBigEx()?
Good question. The doc of the function only mentions under/overflows, so the cases you mention above do not technically match that. You can use CPLGetValueType(str) == CPL_VALUE_INTEGER as an additional test to check if it is an integer (of arbitrary length) Even -- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ gdal-dev mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/gdal-dev
