TkCon feature request...

sigzero_at_gmail.com
Date: 02/11/05


Date: 11 Feb 2005 11:52:44 -0800

You may be able to do this but what I tried didn't work.

It would be neat to be able to do:

% help eval

And get:

NAME
eval - Evaluate a Tcl script

SYNOPSIS
eval arg ?arg ...?

DESCRIPTION
Eval takes one or more arguments, which together comprise a Tcl script
containing one or more commands. Eval concatenates all its arguments in
the same fashion as the concat command, passes the concatenated string
to the Tcl interpreter recursively, and returns the result of that
evaluation (or any error generated by it). Note that the list command
quotes sequences of words in such a way that they are not further
expanded by the eval command.

EXAMPLE
This procedure acts in a way that is analogous to the lappend command,
except it inserts the argument values at the start of the list in the
variable:

proc lprepend {varName args} {
   upvar 1 $varName var
   # Ensure that the variable exists and contains a list
   lappend var
   # Now we insert all the arguments in one go
   set var [eval [list linsert $var 0] $args]
}



Relevant Pages

  • Re: Python noob SOS (any [former?] Perlheads out there?)
    ... if argv is None: ... # parse command line options ... except getopt.error, msg: ... for arg in args: ...
    (comp.lang.python)
  • Re: HP 50G 3D Vector
    ... Please see the previous note re the speed penalty that comes with ... Not sure what built-in functions you're thinking of, but the "bad arg" ... Here, the command *is* performed. ... I see it as being a test function, something like ISPRIME?, for which ...
    (comp.sys.hp48)
  • Re: Perlcritic complains about assignment within conditional
    ... SB> This tells me that pre-declaring a var with '' makes my original logic fail: ... it depends on how you handle the command line arg. ... I see many code snips for Perl ...
    (perl.beginners)
  • Re: cin, iostream problems
    ... >>expecting either a string followed by a whitespace or just a string by ... >>command with no argument, ... > with the arg for each case that requires it. ... > bool reference argument the function sets). ...
    (comp.lang.cpp)
  • Re: cin, iostream problems
    ... >expecting either a string followed by a whitespace or just a string by ... It is stopping and waiting for an argument after any initial command, ... with the arg for each case that requires it. ...
    (comp.lang.cpp)