Passing arguments on Windows (XP)
by tclcoder » Fri, 31 Aug 2007 21:23:51 GMT
Hi,
I'm trying to put a Tk front-end onto a program I've been given
which reads from stdin.
Looking at the manual, it seems that I could do this with exec,
getting the prgram to read from a socket and writing the arguments to
that socket. However, I'm on Windows, and the manual says that reading/
writing from/to a socket doesn't work on Windows.
Is there a mechanism that DOES work, other then writing a
temporary file, which I can see would work, but seems inelegant.
TIA
Alan
Re: Passing arguments on Windows (XP)
by Arjen Markus » Fri, 31 Aug 2007 21:32:32 GMT
Yes, there is:
exec yourprogram << $value
where $value is the value of a variable filled with the
input for the program.
BTW sockets work just as they are supposed to.
You may find http://www.**--****.com/
as well (more general than just Fortran programs :))
Regards,
Arjen
Re: Passing arguments on Windows (XP)
by Gerald W. Lester » Fri, 31 Aug 2007 22:43:56 GMT
You may also want to look at the open command with the pipe ("|") option.
--
+--------------------------------+---------------------------------------+
| Gerald W. Lester |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
Similar Threads:
1.Debug in Windows XP - Clipper 5.2e Exospace+Windows XP
Hi.
I have one problem run my Program in Windows Xp. When I execute it
program with opcao CLD/S the screen isn divides in two in the
superior part the program and the inferior part codigo source
Im use Exospace Lib and include im my lnk File ( FILE CLD.LIB)
2.ISO: technique to pass multiple arguments to a windows bat file
3.How does one pass Unicode command line arguments to Tcl program (Windows 2000)
I'm spawning off a tcl shell from another tcl shell using exec and
passing it arguments with Unicode characters that are not in the
system code page. These appear garbled in the child process. Scanning
the code, it appears as though this is because tclsh uses a main() as
opposed to _wmain and hence the command line gets converted to the
system code page which does not contain all the chars in the argument.
Is this is a known issue ? Is there any way to pass Unicode arguments
to the child tcl shell through an exec command ?
Thanks in advance,
/Ashok
4.passing functions with variable number of arguments as procedure arguments
5.passing functions with variable number of arguments as procedure arguments
In article < XXXX@XXXXX.COM >, Arjen Markus wrote:
>
> Fortran does not allow variable argument lists, so you will
> have to work your way around that limitation.
OK. Good to know :-)
> Other ways you might want to explore:
> 1. Use an assumed-shape array of parameters, rather than a variable list
> of arguments
The parameters can also be vectors, so if I'm correct, this solution
would not work that well since I can't have a vector to be an element of
the assumed-shape array? This solution would only work well if the
parameters are scalars I guess?
> 2. Use a derived type to hold all the parameters, similar to the first
> alternative, but now you can store different types and you can access them
> by name
Hmmm... this might indeed be something to look at...
> 3. Use data from a module. I am not sure that this is a very clean
> solution
I also don't think this is the best way...
I think I will check out the following two possibilities:
1) Work with OPTIONAL arguments
2) Use a derived type to hold all the parameters, and in a specific
function only use the parameters that i need
2) has the advantage I only have to pass 1 extra argument to the
function... so i might want to use that solution...
Thanks,
Bart
--
"Share what you know. Learn what you don't."
6. XP mean Windows XP proffessional
7. windows xp support pack 2 (xp sp2)
8. Windows XP + Windows Office + Clipper