Re: TCL equivalent of PHP "phpinfo()"?
From: Phil Powell (soazine_at_erols.com)
Date: 01/03/04
- Next message: Bryan Oakley: "Re: The "never use string commands with lists" mantra - Why?"
- Previous message: Marc Spitzer: "Re: Bash calls TCL, TCL calls Bash, 2nd Bash never reads input"
- In reply to: Marc Spitzer: "Re: TCL equivalent of PHP "phpinfo()"?"
- Next in thread: Marc Spitzer: "Re: TCL equivalent of PHP "phpinfo()"?"
- Reply: Marc Spitzer: "Re: TCL equivalent of PHP "phpinfo()"?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 2 Jan 2004 19:20:38 -0500
"Marc Spitzer" <mspitze1@optonline.net> wrote in message
news:8665ftkhr3.fsf@bogomips.optonline.net...
> "Phil Powell" <soazine@erols.com> writes:
>
> > See below..
> >
> > "Michael A. Cleverly" <michael@cleverly.com> wrote in message
> > news:Pine.LNX.4.44.0401021546520.20207-100000@gibraltar.cleverly.com...
> > > On 2 Jan 2004, Phil Powell wrote:
> > >
> > > > Michael: Ich hab keine ahnung...
> > > >
> > > > I have no idea why it works, period. I don't understand the concept
> > > > of using global and upvar together and it magically works for me so
I
> > > > am not comfortable with using this code until, line by line, I fully
> > > > understand it.
> > > >
> > > > Phil
> > >
> > > I wrote:
> > >
> > > global arrayName
> > > upvar 0 $arrayName array
> > >
> > > because I wanted you to see the [global] explicitly, since the reason
your
> > > prior code wasn't working was that you were getting a list of global
> > > variables with [info globals], and then attempting to access them
without
> > > bringing them into the scope of your procedure.
> > >
> > > The same net result can be accomplished more succinctly with:
> > >
> > > upvar #0 $arrayName array
> > >
> > > Michael
> > >
> >
> > I'm sorry, but your explanation still makes no sense. I'm sure you're
> > explaining it as clearly as possible, but I'm blocked right now, nothing
you
> > said still makes sense to me.
> >
> > Phil
>
> You need to buy and read this book, at least:
>
> Practical Programming in Tcl and Tk (4th Edition)
> by Brent Welch (Author), Ken Jones (Author), Jeffrey Hobbs
>
> If you do not get some understanding for the whole it is a lot
> harder to make sence of the bits and pieces.
>
> marc
Let me add a bit more reference here. 4+ years TCL experience but in
Vignette - content management. So there are a LOT of TCL commands I simply
do not know how to use, such as upvar or variable or fconfigure, etc.
Because we in Vignette-land don't have to use them that often, I've never
understood specific commands. Since I am not in Vignette right now I am
having to learn it for the first time and so please be patient. I'm not at
your level, I admit it. I've read the online manuals on upvar and I still
don't fully understand it, period. I understand "global" but that's from my
PHP background: global simply puts the variable reference into the scope of
the proc so that the proc can use it.
Phil
- Next message: Bryan Oakley: "Re: The "never use string commands with lists" mantra - Why?"
- Previous message: Marc Spitzer: "Re: Bash calls TCL, TCL calls Bash, 2nd Bash never reads input"
- In reply to: Marc Spitzer: "Re: TCL equivalent of PHP "phpinfo()"?"
- Next in thread: Marc Spitzer: "Re: TCL equivalent of PHP "phpinfo()"?"
- Reply: Marc Spitzer: "Re: TCL equivalent of PHP "phpinfo()"?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|