ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> tcllib-bugs
tcllib-bugs
[Tcllib-bugs] [ tcllib-Bugs-1471885 ] snit2.tcl - faulty "in" keyword
by SourceForge.net other posts by this author
Apr 18 2006 9:19AM messages near this date
[Tcllib-bugs] [ tcllib-Bugs-1471885 ] snit2.tcl - faulty "in" keyword | [Tcllib-bugs] [ tcllib-Bugs-1471885 ] snit2.tcl - faulty "in" keyword
Bugs item #1471885, was opened at 2006-04-17 11:32
Message generated for change (Comment added) made by nobody
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=112883&aid=1471885&group_id=12883

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: snit
Group: None
Status: Closed
Resolution: Invalid
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Don Porter (dgp)
Summary: snit2.tcl - faulty "in" keyword

Initial Comment:
Don't know what the deal is..


-@- -) tclsh
% info tclversion
8.5
% info patchlevel
8.5a2
% package require snit
2.0
% snit::type dog { }
syntax error in expression "$name in $arglist": extra 
tokens at end of expression


So I look in the source and find
    if {$name in $arglist} {
replace it with
    if {[lsearch $arglist $name] != 1} {
and recompile which fixes that 'bug'.


-@- -) tclsh
...
% snit::type dog { }
::dog
% snit::type dog {option -color brown}
syntax error in expression "$option in $compile
(delegatedoptions)": extra tokens at end of expression


So I find all instances of:
    if {X in Y} {
replace them with
    if {[lsearch Y X] != 1} {
and recompile to fix.


But what gives? I can't find "X in Y" used anywhere 
else in tcllib, and the only clue I have is the "in" 
procedure for xifo objects.

Dylan.

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2006-04-18 09:18

Message:
Logged In: NO 

Ok, thanks. Did not even know there's a new "in" keyword.
I guess I was using the latest ActiveState Mac release.

Dylan.

----------------------------------------------------------------------

Comment By: Don Porter (dgp)
Date: 2006-04-17 21:16

Message:
Logged In: YES 
user_id=80530


If you're going to rely
on alpha releases, you'll
have to pay some attention
to ongoing development.

Are you confident that you're
working with the actual 8.5a2
release?  Or could this be
a snapshot of the development
sources taken before release?
The 'changes' file reports:

...
2004-10-08 (new feature)[TIP 201] "in" and "ni" expr
operators (fellows)
...
--- Released 8.5a2, December 7, 2004 --- See ChangeLog for
details ---
...

so any install of the actual 8.5a2
release (or better yet, 8.5a3, or
an 8.5a4 release candidate, or the
latest development snapshot you can
stand), ought to resolve the issue.

If there's a bug here, it might be
that things would be a bit better
if snit could indicate its need
for 8.5a2 or better, so that a
[package require] might fail instead
of a random command.  There are
two obstacles to that.

First, the [package] command fails
to support version numbers with
alpha or beta designations.  This
is Tcl Feature Request 219296.

Second, during alpha development,
it's fairly common to run into
an interpreter that isn't based
on any official release, but is some 
development snapshot that may or
may not have the same features as
its [info patchlevel] would indicate.
So even a working
[package require Tcl 8.5a2] would
not help since your interp claims
to be 8.5a2 but lacks the features
of the real 8.5a2 release.  One can
imagine version number bumping
schemes that could deal with that, but
getting them followed reliably seems
unlikely.

Update your Tcl to one that supports
the "in" operator.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=112883&aid=1471885&group_id=12883


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Tcllib-bugs mailing list
Tcllib-bugs@[...].net
https://lists.sourceforge.net/lists/listinfo/tcllib-bugs
Thread:
SourceForge.net
SourceForge.net
SourceForge.net

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved