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 >> tcl-bugs
tcl-bugs
[Tcl-bugs] [ tcl-Bugs-1615277 ] string equal example wrong in doc
by SourceForge.net other posts by this author
Dec 14 2006 6:25AM messages near this date
[Tcl-bugs] [ tcl-Bugs-1615277 ] string equal example wrong in doc | [Tcl-bugs] [ tcl-Bugs-1615277 ] string length example wrong in doc
Bugs item #1615277, was opened at 2006-12-13 21:23
Message generated for change (Settings changed) made by dkf
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110894&aid=1615277&group_id=10894

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: 18. Commands M-Z
Group: current: 8.4.14
> Status: Closed
> Resolution: Fixed
Priority: 5
Private: No
Submitted By: David Scott Cargo (escargo)
Assigned to: Donal K. Fellows (dkf)
Summary: string equal example wrong in doc

Initial Comment:
The following code appears in the documentation for string, as an example of using string eq
ual:

Test if the string in the variable string is a proper non-empty prefix of the string foobar.
 
set length [string length $string]
if {$length == 0} {
   set isPrefix 0
} else {
   set isPrefix [string equal -length $string $string "foobar"]
}

It has an unnoticed bug: the variable after the -length should be $length, not $string.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=110894&aid=1615277&group_id=10894

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Tcl-Bugs mailing list
Tcl-Bugs@[...].net
https://lists.sourceforge.net/lists/listinfo/tcl-bugs
Thread:
SourceForge.net
SourceForge.net

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