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,473 of 117,927   
   albert@spenarnc.xs4all.nl to sjack   
   Re: pipe input   
   07 May 24 17:42:59   
   
   In article , sjack  wrote:   
   >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.)   
      
   You can use stdin all the time, in linux, the trick is to use   
   READ-FILE throughout. That handles the rubout key for you   
   ("backspace").   
   For KEY I switch the terminal by TERMIO temporarily, same for   
   KEY? .   
      
   Linux provides you with the input editing facilities, that you have   
   used in your shell and even a command history,   
   if you do   
       rlwrap forth   
   >   
   >--   
   >me   
      
   Groetjes Albert   
   --   
   Don't praise the day before the evening. One swallow doesn't make spring.   
   You must not say "hey" before you have crossed the bridge. Don't sell the   
   hide of the bear until you shot it. Better one bird in the hand than ten in   
   the air. First gain is a cat purring.            - the Wise from Antrim -   
      
   --- 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