From: rjh@cpax.org.uk   
      
   On 14/12/2022 3:43 pm, Stefan Ram wrote:   
   > Richard Heathfield writes:   
   >> On 14/12/2022 1:23 pm, Stefan Ram wrote:   
   >>> Richard Heathfield writes:   
   >>>> Your problem is closely related to the very first question I was   
   >>>> ever posed (in early 1982), by a friend who needed to be able to   
   >>>> establish cleanly in a single expression whether a keypress was a   
   >>>> digit (ASCII 48-57). The relevant dialect of BASIC didn't have   
   >>>> anything like an isdigit function.   
   >>>> The friend was on the point of giving up on me when I handed him   
   >>>> ABS(K-52.5)<4.5   
   >>> "K >= 48 AND K <= 57" also is a single expression in BASIC.   
   >> The available keywords were LET, PRINT, END, FOR...NEXT, GOTO,   
   >> GOSUB...RETURN, IF...THEN line number, DEF, READ, DATA, DIM, and   
   >> REM. AND was not amongst them. Also available were these   
   >> functions: ABS, ATN (arc tan), COS, EXP, INT, LOG, RND, SIN, SQR   
   >> (root).   
   >   
   > Sometimes, multiplication can be used for "AND".   
   > I.e., "( K >= 48 )*( K <= 57 )".   
      
   Yes, I know. Barely a fortnight after using a mainframe computer   
   for the first time, I didn't know it /then/. With 40 years of   
   programming experience, it is not difficult to devise better   
   solutions to the problems I encountered 40 years ago. But when   
   you're there, you have to use what knowledge you have and what   
   you can dredge up from the photostats that served as a manual.   
      
   --   
   Richard Heathfield   
   Email: rjh at cpax dot org dot uk   
   "Usenet is a strange place" - dmr 29 July 1999   
   Sig line 4 vacant - apply within   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|