Forum > Beginners
decimal floating point
srvaldez:
I am a beginner FreePascal tinkerer, here's a translation of my decimal math routines
note that the str2fp is especially horrible, it tries to parse a numeric string ignoring spaces or any non-number characters so it's incredibly clunky
criticism is welcome
the source code is about 2000 lines so you can download the zipped file from https://u.pcloud.link/publink/show?code=XZICyJ0ZuSSoJh415mSOWzyfB9O6UYzwJ4R7
Bart:
Not exactly sure what his is about, but I saw multiple goto's, which made me shudder...
Bart
srvaldez:
parsing a string is always difficult for me, did you run the code?
I tried to use the break statement but it failed to work in that convoluted code
TRon:
--- Quote from: srvaldez on February 17, 2024, 11:56:27 pm ---I tried to use the break statement but it failed to work in that convoluted code
--- End quote ---
Instead of break (which will stop the while loop) you should be using continue.
srvaldez:
thank you TRon for the tip :)
code updated.
Navigation
[0] Message Index
[#] Next page