Response to Clippy and OLPC

by rpgfan3233 (Login rpgfan3233)

 
Clippy:
I referenced what FB did with regards to a standalone SHELL statement in my post, so why did you attack OLPC for bringing up what FB does and not me, despite the fact that I did the same thing?

All he was suggesting was that FB had a convenient way of doing something.


OLPC:
I see what you're saying. However, after trying it out, it didn't work for me well. My idea was to capture stdout and stderr at the same time. With FB, you have to use Open Pipe in combination with Open Err, though I'm not sure how to do this because when I tried it with FB 0.18.3, it hung because it was looking for input, I guess. The alternative is to add a " 2>&1" string to the end of the shell command passed to Open Pipe, which isn't difficult, but I prefer to open stderr and stdout at the same time. Also, a simple 'Open Pipe "fbc >&2" For Input As 2' in combination with an 'Open Err As 1' doesn't capture the shell command passed to Open Pipe. What a drag. :P

I would have brought up pipes if it weren't for the fact that they are programmed differently in Windows and Linux. Linux/Unix uses popen, whereas Windows uses something like CreatePipe.

I suppose stdin could also be captured if necessary. I can see the use of doing such a thing if an external program needed to be called via SHELL and that program had a part requiring user input. Nobody would want to see -

Enter your name:
Your name is Bill.

What happened to the part where you actually entered your name? :P

Of course, something like the 'tee' utility found in Linux environments would need to be used to allow for the input to also be outputted. Otherwise, there would be no way to capture the input to my knowledge. For that, pipes would be necessary. I suppose there really is no way around that if stdin is to be captured when SHELL is used.



------------------
Waiting patiently for Windows 7, XHTML 2.0, CSS 3.0, PHP 6.0, the ratification of C++0x, and the day that I can code without logic troubles.

Posted on Feb 29, 2008, 6:28 PM

Respond to this message   

Return to Index

Response TitleAuthor and Date
Clippy and I are like this: ( x _ x );;OLPC on Feb 29
Because OLPC brings up FB and critisizes the project constantly!Clippy on Feb 29
Because OLPC brings up FB and critisizes the project constantly!Clippy on Feb 29
Because OLPC brings up FB and critisizes the project constantly!Clippy on Feb 29
 Remember when I said, "Show your code, and I'll show mine?"OLPC on Feb 29
 Remember when I said, "Show your code, and I'll show mine?"OLPC on Feb 29
  * Sorry for the double post; I kept getting 500 errors. :-/OLPC on Feb 29
   I wouldn't worry about those double posts.rpgfan3233 on Feb 29
   * 500 errors? I only get that many errors when I use FreeBasic. (j/k)Pete on Mar 1
  Why a comma?The PhyloGenesis on Mar 1
   It is like saying, "Hello, George."rpgfan3233 on Mar 1
    * That's why I like WHOGAS?. It doesn't need a comma.Pete on Mar 1

 Copyright © 1999-2014 Network54. All rights reserved.   Terms of Use   Privacy Statement