Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by amirvosko

  1. amirvosko

    Challange !! How to override one sub command only

    That's the workaround I'll probably go for. Overriding the exiting command is still better as users and existing scripts do need to be aware of that. By creating new command we'll have to update scripts and users and in response get complains that our implementation is not compatible with TCL .
  2. amirvosko

    Challange !! How to override one sub command only

    Hello all, Some commands names in TCL are composed from several words for example "info tclversion" "info script" and "info body" . I need to override one of these commands ( "info script" ) but to keep the rest of them alive. Unfortunately, overriding the command "info script" either...
  3. amirvosko

    empty string inside a function

    You are right it is a specific problem to our in house parser that comes on top of the standart TCL parser. In the original TCL "proc" command (vs our "func" derivative of it) their indeed no problem and the empty string/list is past into the proc as I would expected. Our "func" command parse...
  4. amirvosko

    empty string inside a function

    Can anyone explain what happend to an empty string ( "" ) when passed as parameter into a function. I'm trying to do the TCL equivalnt for the C code : void foo(const string & str ) { if (str == "") { cout << "Eurika"; } } What I see is that in the Tcl function the empty...
  5. amirvosko

    Filenames

    Little bug : The regexp would through away also have of the string if it contain chars you didn't think of Like the '_' in Bongs example . Better solution would be to use the "string trim" command set trim_name [string trim $name "1234567890"] # I know this would surprise many but...
  6. amirvosko

    error checking-time format

    Better have set pat {^((0|0[0-9])|1[0-2]):[0-5][0-9]$} or set pat {^((0|[01][0-9])|2[0-3]):[0-5][0-9]$} This should cover all valid time (12 hours or 24 hours ). Just pay attention to the bounds 0:mm 12:mm 24:mm . It's up to you to decide whitch of those is a valid hour on earth
  7. amirvosko

    &quot;clock seconds&quot; hangs

    Hello all, I found a weired problem that some commands like "clock seconds" or "after" would hang on windows if excuted after "info hostname" Is that a known TCL problem

Part and Inventory Search

Back
Top