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,874 of 117,927    |
|    Ruvim to dxf    |
|    Re: Number parsing with checks    |
|    13 Oct 24 06:20:55    |
      From: ruvim.pinka@gmail.com              On 2024-10-13 05:13, dxf wrote:       > On 13/10/2024 12:54 am, Ruvim wrote:       >> On 2024-10-12 05:45, dxf wrote:       >>> The basics:       >>>       >>> : .BAD ( -- ) cr ." Invalid item" .abort ;       >>>       >>> : ZE? ( x -- ) if .bad then ; \ abort if non-zero       >>> : NZ? ( x -- ) 0= ze? ; \ abort if zero       >>       >> Typically, if word name ends with a question mark, the first (top) output       parameter of the word is a *flag*. And it's true for all standard words.       (though, opposite is not true)       >       > It's rather similar.       >       > ZE? NZ? destructively tests TOS              But these words do not return a flag in the first output parameter. So,       their names violate the common convention.                     > ?ZE ?NZ non-destructively tests TOS              These names follow the common convention. A question mark at the       beginning of a name means that the word does something or does nothing       depending on certain conditions.              Well known nonstandard words: `?stack` `?csp` `?comp` `?exec`       Standard words: `?do` `?dup`                     >       > Only difference is test and action are rolled into the one function.       >                     --       Ruvim              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca