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,474 of 117,927   
   sjack to All   
   pipe input   
   07 May 24 15:09:35   
   
   From: sjack@dontemail.me   
      
   Using 'xargs' with FigForth to handle multi-lines of pipe input:   
      
   :) cat << EOF | xargs myfig "20 constant A" "2 constant B"   
   cr   
   A B   
   tuck * +   
   '." --> "' .   
   bye   
   EOF   
      
   --> 42 :)   
      
   I recall an old DOS Forth had -FILE and -TERMINAL options where   
   -FILE option was used for piped input afterwich -TERMINAL would   
   switch the Forth back to terminal input.   
      
   On Linux using Readline allows direct piped input but I prefer   
   just using xargs for piped input and not altering termio.   
   ( With termio's raw mode "Ok" is able to be placed on the line of   
   the last input; with Readline the "Ok" falls on the next line due   
   to Readline echoing newline.)   
      
   --   
   me   
      
   --- 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