Re: [Flashforth-devel] Free form number
Brought to you by:
oh2aun
From: Mike M. <mi...@mo...> - 2014-03-27 06:39:14
|
Forth typically converts a double number when there is ANY of the following punctuation chrs present anywhere in the number , . / - : The exception is a leading - chr which indictes a negative number. See Starting Forth, Leo Brodie. These punctuations support European and US number and time formats, and many others. I see nothing wrong with adding the _ chr. FF 4.8 only recognizes a . chr at the end of the digits, so I needed to write my own number conversion word. A double number format closer to the standard would be nice. Mike Miller Moon Valley Circuits mi...@mo... http://www.moonvalleycircuits.com/ On 3/26/14 10:38 AM, Mikael Nordman wrote: > I could easily extend the FF >number so that it > would work as today but just ignore certain punctuation. > > What would be the best choice for punctuation ? > Perhaps the comma character. > > Or use the period anywhere in number to indicate that it as double number. > Not having any punctuation in single numbers. This is how > it is described in Forth Programmers Handbook. > > Single precision number > #10,345 > %1011,1101,1111,0000 > $fad,e > > Double precision numbers > %1011_1101_1111_0000. > #10,345. > $fade,babe. > $f,a,d,e,b,a,b,e. > > > You proposal with separate parsing words can be implemented as an add-on > if wanted. > > BR Mike > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/13534_NeoTech > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel > > |