diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2023-05-31 10:33:01 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2023-05-31 10:33:01 (GMT) |
commit | 38c9c34398bc61793d4794a1c4dadb3a36f23847 (patch) | |
tree | 60950a8e49337252996f44d01e2adcfb7292ae94 /library/readfile.tcl | |
parent | d3acda84955821249bc38d697afe3cc890ac1bf2 (diff) | |
download | tcl-38c9c34398bc61793d4794a1c4dadb3a36f23847.zip tcl-38c9c34398bc61793d4794a1c4dadb3a36f23847.tar.gz tcl-38c9c34398bc61793d4794a1c4dadb3a36f23847.tar.bz2 |
Swapped foreachLine arg order, improved docs
Diffstat (limited to 'library/readfile.tcl')
-rw-r--r-- | library/readfile.tcl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/readfile.tcl b/library/readfile.tcl index 350bcd4..c1d5b84 100644 --- a/library/readfile.tcl +++ b/library/readfile.tcl @@ -14,7 +14,7 @@ proc readFile {filename {mode text}} { set mode [tcl::prefix match -message "mode" -error $ERR $MODES $mode] # Read the file - set f [open $filename [expr {$mode eq "text" ? "r" : "rb"}]] + set f [open $filename [dict get {text r binary rb} $mode]] try { return [read $f] } finally { |