09-27-2024, 04:15 PM
(09-27-2024, 09:31 AM)bplus Wrote: I got this from Steve at old forum and tested it today on problem encountered by Cortez at another forum.
It does not work:
(09-27-2024, 02:26 PM)bplus Wrote: The problem was not using proper Sci Notation.
First number must be between 1 and < 10 and you have to use + for positive powers of 10.
Also fine!
It only works when the notation works. Pass it bad data, it returns bad results. There should've been a helper function with it somewhere called Function VerifyNum that makes certain your passing a valid number. It's a little complex and a lot of basic error checking, and as such I didn't make it part of the main process so that it could be easily bypassed for those times when you KNEW your data was valid and didn't want to add in those extra checks for processing delays.
Back in the day, these routines were used for String Math routines, and as such reducing non-necessary error checking was an important thing to keep run time as quick as possible. If they're not certain the data is always in valid format, then you might need to hunt down that VerifyNum (or was it CheckNum??) routine and add it as a pre-check before running the N2S$ routine.