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,855 of 117,927   
   dxf to Ruvim   
   Re: Reverse SCAN SPLIT   
   07 Oct 24 22:22:57   
   
   From: dxforth@gmail.com   
      
   On 7/10/2024 9:02 pm, Ruvim wrote:   
   > ...   
   > Why do you prefer the order ( u.hour u.min u.sec ) rather than ( u.sec u.min   
   u.hour ) ?   
   >   
   > The later order makes code simpler in (1) and (2), also, it follows the   
   order of parameters in `TIME&DATE`.   
   >   
   > Moreover, if you want to convert three components to seconds, you need to   
   reverse their order again:   
   >   
   > : time3-to-seconds ( u.hour u.min u.sec -- u.sec-total )   
   >   swap rot  60 * + 60 * +   
   > ;   
   >   
   > If the order of parameters is reversed, the above definition takes a simpler   
   form:   
   >   
   > : time3-to-seconds ( u.sec u.min u.hour -- u.sec-total )   
   >   60 * + 60 * +   
   > ;   
      
   I thought it would be easier to convert to total secs (on 16-bit it has to be   
   a double).   
   But perhaps not.   
      
   --- 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