Passing arguments on Windows (XP)

tcl

    Next

  • 1. tktreectrl crash on Unix
    We are seeing a crash when running the tktreectrl on all Unix platform when selecting the bitmaps or iMovie demos. The call stack is showing a problem in a call to ScrollVerticalSimple() Is anyone else seeing this?
  • 2. Newbie questions about TkCon
    Hi, I am learning Tcl and I am using ActiveTcl 8.4 on win xp. I just fired up tkcon.tcl and it is much better than wish84.exe which I used before. But I have a few questions about TkCon: (1) Where should I put the TkCon resource file? I am using windows xp. Should I put it under c:\? Also what is the filename for resource file? (2) According to the TkCon documentation, I can set the history length by doing set ::tkcon::OPT(history) 50 However, the namespace "tkcon" does not exist and so I get an error message when I type this command in the prompt. Am I missing something? (3) I really like TkCon to automatically save the history when I exit the program and automatically reload it when I run TkCon again. But where is the history actually saved? Is it saved in a text file? I tried to do a search for this file based on a command in the history but I found nothing. Also how to set the length of this history? Is this also set by ::tkcon::OPT(history)? Thanks.
  • 3. registry hack for wish shell contextual menus
    I'd like to have a registry hack similar to [HKEY_CLASSES_ROOT\Directory\shell\Command] @="Command &Prompt" [HKEY_CLASSES_ROOT\Directory\shell\Command\command] @="cmd.exe" that will open either a wish shell or a tkcon shell from the contextual menu of a directory using the WinXP explorer. Does anyone know how to do this? My experiments have failed so far. I did it with emacs on one of my computers but I forgot to save the registry hack, and have forgotton how to do it. -- sheila
  • 4. Entry box question
    Hi all. How to make entry box accept only upper-case letters? So anything I type will appear in upper-case. Is there predefined option for this. Regards, Alex

Passing arguments on Windows (XP)

Postby 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)

Postby 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)

Postby 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



Return to tcl

 

Who is online

Users browsing this forum: No registered users and 44 guest