home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.forth      Forth programmers eat a lot of Bratwurst      117,927 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 116,992 of 117,927   
   albert@spenarnc.xs4all.nl to Anton Ertl   
   Re: FP number syntax   
   02 Jan 25 15:21:46   
   
   In article <2024Dec31.225755@mips.complang.tuwien.ac.at>,   
   Anton Ertl  wrote:   
   >albert@spenarnc.xs4all.nl writes:   
   >>A forth that interprets e.g. 3.14 as a floating point number   
   >>is as non-standard as a Forth that interprets 3.14 is a double.   
   >   
   >Forth-94 and Forth-2012 do not standardize recognizing 3.14, so   
   >standard systems are allowed to deal with "3.14" as they deem useful.   
   >The possible options include recognizing "3.14" as a double-cell   
   >integer, as a FP number, or not recognizing "3.14" and producing an   
   >error message.   
   >   
   >However, I think that recognizing "314." as a double-cell integer (as   
   >required by these standards), but recognizing "3.14" as an FP number   
   >is even more confusing and error prone than recognizing both as a   
   >double-cell integer.   
   >   
   >>How would a proposal like this fare:   
   >>"   
   >>    A double number is only recognized as it ends *and starts*   
   >>    with a period.   
   >   
   >Existing practice?  What's wrong with "#314."?   
      
   There is no existing practice, of course.   
   How hard could it be to get used to ".314.  as long as you use   
   .314. ?   
   The confusion between 31E0 (hex) 31E0 (fp) 3.10 is another   
   roadblock to Forth newbies.   
   And then fixed point. That adds to the confusion.   
   I'd rather introduce a prefix ("recognizer") of some sort,   
   to make sure that the program doesn't compile instead of   
   strange behaviour.   
      
   >   
   >>    Recognizing a double if it ends only in a period becomes   
   >>    obsolescent.   
   >>"   
   >   
   >That part may have an easier time.   
   I meant   
       Recognizing a double if it contains one single period at the end   
       becomes obsolescent.   
   >   
   >- anton   
   >--   
   >M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html   
   --   
   Temu exploits Christians: (Disclaimer, only 10 apostles)   
   Last Supper Acrylic Suncatcher - 15Cm Round Stained Glass- Style Wall   
   Art For Home, Office And Garden Decor - Perfect For Windows, Bars,   
   And Gifts For Friends Family And Colleagues.   
      
   --- SoupGate-DOS v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca