|
From: Block, K. <Ken...@hp...> - 2002-09-27 17:21:23
|
This is interesting. It works fine from C, but not Basic. I wonder if =
the magic to make sys$input equal stdin is inside the CRTL. I wonder if =
it works for Pascal or Fortran? Could somebody test Pascal and Fortran, =
it has been quite some time since I used either and do not have the =
compilers handy.
$ bash
bash$ echo "Hello" | ./t
Test? output: Hello
bash$ cat t.c
#include <stdio.h>
void main()
{
char s[100];
printf("Test? ");
scanf("%s",&s);
printf("output: %s\n",s);
}
-----Original Message-----
From: Ben Armstrong [mailto:be...@bg...]
Sent: Friday, September 27, 2002 11:58 AM
To: gnv...@li...
Subject: [Gnv-help] VMS's sys$input !=3D bash's stdin for trivial =
program?
I cannot seem to redirect stdin for a trivial program. Here's how to
reproduce my problem:
Create test.bas:
---- cut here ----
declare string s
print "Test";
linput s
print s
---- cut here ----
Compile/link it:
$ basic test
$ link test
Then test as follows:
$ bash
bash$ ./test
Test? foo
foo
bash$ echo "foo" | ./test
Test? bar
bar
What happened to my second "foo"? It seemed to go into the ether. I
can't figure out how to get "test.exe" to read from stdin.
If I cannot do this simple thing, bash/gnv is useless for my purposes
(as a portable replacement for DCL, to be used on both VMS and Wintel
(cygwin) systems). I really hope I'm just missing something simple,
here.
Ben
--
Ben Armstrong -. Medianet Development Group,
BAr...@dy... `-. Dymaxion Research Limited
<URL: http://www.dymaxion.ca/> `- Halifax, Nova Scotia, Canada
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Gnv-help mailing list
Gnv...@li...
https://lists.sourceforge.net/lists/listinfo/gnv-help
|