Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Variable naming conventions and how to use Help file (newbie)

18 views
Skip to first unread message

Richard Owlett

unread,
Jul 7, 2007, 5:49:46 PM7/7/07
to
My original question was "What variable naming convention is typically
used?" Or, "How do I avoid collisions of variable names and tcl keywords?"

That led to exploring the help system which comes with ActiveStates
ActiveTcl. It seems to be exhaustive. But search functionality leaves me
lost. It will list pages where desired term appears. *BUT*, there seems
to be no way to find just where term is used in a page that may be over
3000 words long.

Comments? Suggestions?

Thank you.

Alan Anderson

unread,
Jul 7, 2007, 10:07:44 PM7/7/07
to
Richard Owlett <row...@atlascomm.net> wrote:

> My original question was "What variable naming convention is typically
> used?" Or, "How do I avoid collisions of variable names and tcl keywords?"

There are no "tcl keywords" as such. Command names and variable names
do not collide; they are in separate categories.

> That led to exploring the help system which comes with ActiveStates
> ActiveTcl. It seems to be exhaustive. But search functionality leaves me
> lost. It will list pages where desired term appears. *BUT*, there seems
> to be no way to find just where term is used in a page that may be over
> 3000 words long.

What OS are you using? I have no problem searching through a page of
text on my Windows system at work.

Cameron Laird

unread,
Jul 7, 2007, 10:18:15 PM7/7/07
to
In article <aranders-317F01...@news.isp.giganews.com>,

Alan Anderson <aran...@insightbb.com> wrote:
>Richard Owlett <row...@atlascomm.net> wrote:
>
>> My original question was "What variable naming convention is typically
>> used?" Or, "How do I avoid collisions of variable names and tcl keywords?"
>
>There are no "tcl keywords" as such. Command names and variable names
>do not collide; they are in separate categories.
.
.
.
... and it's not even uncommon to encounter stylish code
which depends on this, in the sense that "$button" or
"$list" make frequent appearances in small procedures.

Richard Owlett

unread,
Jul 8, 2007, 9:51:54 AM7/8/07
to
Alan Anderson wrote:
> Richard Owlett <row...@atlascomm.net> wrote:
>
>
>>My original question was "What variable naming convention is typically
>>used?" Or, "How do I avoid collisions of variable names and tcl keywords?"
>
>
> There are no "tcl keywords" as such. Command names and variable names
> do not collide; they are in separate categories.

OK. So
set puts "this is weird"
puts $puts
is perfectly legitimate, if bordering on unreadable.

>
>
>>That led to exploring the help system which comes with ActiveStates
>>ActiveTcl. It seems to be exhaustive. But search functionality leaves me
>>lost. It will list pages where desired term appears. *BUT*, there seems
>>to be no way to find just where term is used in a page that may be over
>>3000 words long.
>
>
> What OS are you using? I have no problem searching through a page of
> text on my Windows system at work.

WindowsXP Pro.

Its a previously unnoticed "feature" of Windows Help system (in this
case display of *.chm files). Once you get to a "help page", there is
never a means to search within the page.

The issue is now moot as I came across http://www.tcl.tk/man/ and its
link to Core Documentation in html. Its the same information accessed in
two different ways. So I'll use either/both as needed.

Thanks

Richard Owlett

unread,
Jul 8, 2007, 9:54:04 AM7/8/07
to
Cameron Laird wrote:

OY VEH! ;)

Jeff Godfrey

unread,
Jul 8, 2007, 11:06:11 AM7/8/07
to

"Richard Owlett" <row...@atlascomm.net> wrote in message
news:1391qtp...@news.supernews.com...

> Its a previously unnoticed "feature" of Windows Help system (in this
> case display of *.chm files). Once you get to a "help page", there
> is never a means to search within the page.

Sure there is... Once you arrive at a specific page in the CHM file...

- Click in the right-hand pane (the content pane)
- Press Ctrl+F to open a standard "Find" dialog
- Type your search string there...

Jeff


Alan Anderson

unread,
Jul 8, 2007, 11:32:24 AM7/8/07
to
Richard Owlett <row...@atlascomm.net> wrote:

> Its a previously unnoticed "feature" of Windows Help system (in this
> case display of *.chm files). Once you get to a "help page", there is
> never a means to search within the page.

That's neither a feature nor a bug. It's an operator error. Just use a
reasonably standard control-F to invoke the Find dialog.

> The issue is now moot as I came across http://www.tcl.tk/man/ and its
> link to Core Documentation in html. Its the same information accessed in
> two different ways. So I'll use either/both as needed.

I tend to use the Tcler's Wiki more often than the local help, myself.

Richard Owlett

unread,
Jul 8, 2007, 2:30:21 PM7/8/07
to

Now you're going tell me that that has been around since Windows ran on
top of DOS in 640k ;/
Live-n-learn

pwe...@zonnet.nl

unread,
Jul 8, 2007, 3:54:28 PM7/8/07
to
One problem I have with the chm file (with tcl 8.4.12) is that my editor
(ultra-edit) does not open the with the tcl key word or a search for
that word, when I highlight a word and press F1. With the old .hlp files
of 8.3, this worked very well.

Peter

Donal K. Fellows

unread,
Jul 8, 2007, 5:06:07 PM7/8/07
to
pwel...@zonnet.nl wrote:
> One problem I have with the chm file (with tcl 8.4.12) is that my editor
> (ultra-edit) does not open the with the tcl key word or a search for
> that word, when I highlight a word and press F1. With the old .hlp files
> of 8.3, this worked very well.

You can also use http://www.tcl.tk/man/tcl8.4/TclCmd/<cmd>.htm
(remember to replace <cmd> with the command name!) directly, and those
pages are trivially searchable using numerous online services...

Donal.

Larry W. Virden

unread,
Jul 9, 2007, 8:12:36 AM7/9/07
to
On Jul 7, 5:49 pm, Richard Owlett <rowl...@atlascomm.net> wrote:
> My original question was "What variable naming convention is typically
> used?" Or, "How do I avoid collisions of variable names and tcl keywords?"
>

One answer is "Read over the Tcl Style Guide" document, which, while
written a bit ago, still contains lots of relevant information ... I
don't particularly remember anything missing in there. See http://wiki.tcl.tk/708
for that information.

Another answer is "proper use of namespaces limits collisions". The
catch, of course, is making certain that the name of your namespace is
unique.

At one point, http://pitch.nist.gov/nics/ was offered as a web site
where one could register namespace names, extension names, etc.

However, when I attempted to access that web site this morning, I was
unable to get a response. I don't know the status of that facility.

Richard Owlett

unread,
Jul 9, 2007, 9:15:07 AM7/9/07
to
Larry W. Virden wrote:
> On Jul 7, 5:49 pm, Richard Owlett <rowl...@atlascomm.net> wrote:
>
>>My original question was "What variable naming convention is typically
>>used?" Or, "How do I avoid collisions of variable names and tcl keywords?"
>>
>
>
> One answer is "Read over the Tcl Style Guide" document, which, while
> written a bit ago, still contains lots of relevant information ... I
> don't particularly remember anything missing in there. See http://wiki.tcl.tk/708
> for that information.

It even points outs at least one common syntax error ( improper
placement of a "{" ) I must be common error - I made it in less than 1
week ;)

Thru links it also leads to a very informative page
http://wiki.tcl.tk/_ref/3122 "References to Category Tutorial".

Just the tutorial titles give a raw beginner a broad view of what tcl
"is"/"can do".

0 new messages