Tcl Source Code

Check-in [02ef6fa87e]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:[a122627849] Improve stack trace from parray on not-array.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 02ef6fa87e646f177a936de4997593412ffaf905
User & Date: dkf 2013-11-24 18:35:01
Context
2013-12-06
17:34
Merge to pre-conflict. check-in: f3f5be3937 user: dgp tags: dgp-refactor
05:24
3x speed improvement in foreach, via new compiler and opcodes. The old version remains for old .tbc ... check-in: 93a75ad1c4 user: mig tags: trunk
2013-12-05
20:45
Draft fix for Bug 0b874c344d. Includes test. check-in: de30f9f78a user: dgp tags: bug-0b874c344d
15:15
New compiler and bytecodes for foreach and lmap: 70% faster
* speed as measured by http://wiki...
check-in: 3782af5f5a user: mig tags: mig-opt-foreach
2013-11-29
18:14
Modified info frame's coro handling to allow for a caller coro without cmdFramePtr (toplevel) Leaf check-in: f8164c896c user: andreask tags: bug-0b874c344d-ak-info-frame-coro
2013-11-24
22:12
merge trunk check-in: 162f412163 user: jan.nijtmans tags: novem
18:35
[a122627849] Improve stack trace from parray on not-array. check-in: 02ef6fa87e user: dkf tags: trunk
18:34
[a122627849] Improve stack trace from parray on not-array. check-in: 2c4acdb880 user: dkf tags: core-8-5-branch
2013-11-22
13:21
revert accidental part of previous commit check-in: b7d07f415c user: jan.nijtmans tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to library/parray.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# parray:
# Print the contents of a global array on stdout.
#
# Copyright (c) 1991-1993 The Regents of the University of California.
# Copyright (c) 1994 Sun Microsystems, Inc.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#

proc parray {a {pattern *}} {
    upvar 1 $a array
    if {![array exists array]} {
	error "\"$a\" isn't an array"
    }
    set maxl 0
    set names [lsort [array names array $pattern]]
    foreach name $names {
	if {[string length $name] > $maxl} {
	    set maxl [string length $name]
	}













|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# parray:
# Print the contents of a global array on stdout.
#
# Copyright (c) 1991-1993 The Regents of the University of California.
# Copyright (c) 1994 Sun Microsystems, Inc.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#

proc parray {a {pattern *}} {
    upvar 1 $a array
    if {![array exists array]} {
	return -code error "\"$a\" isn't an array"
    }
    set maxl 0
    set names [lsort [array names array $pattern]]
    foreach name $names {
	if {[string length $name] > $maxl} {
	    set maxl [string length $name]
	}