tabemann / zeptoforth

A not-so-small Forth for Cortex-M
MIT License
182 stars 15 forks source link

Does the documentation mention number parsing? #44

Closed robzed closed 9 months ago

robzed commented 1 year ago

I think Zeptoforth supports direct hex numbers $4A3 , decimals #123 , binary %10011 , doubles 12.3 and fixed point 12,4 ... but I don't see these documented anywhere?

I looked at basic Git front page, wiki or supplied release package docs.

Of course, people could just look at the source code :-)

tabemann commented 1 year ago

I have added more content on numbers to the wiki. In the process of this I have discovered two things - first, I don't have parsing routines exposed to the user to parse double-cell and fixed-point numbers, and there's a major bug in parsing numbers with bases smaller than 2 or larger than 16.

tabemann commented 1 year ago

I have now implemented parse-double, parse-double-unsigned, and parse-fixed to enable parsing double-cell integers and fixed-point numbers from strings, and have fixed the bug in the handling of unsupported bases.

tabemann commented 1 year ago

Note that this is not in a build yet but is in the master and devel branches.

robzed commented 1 year ago

Fantastic!