Skip to content
Tcl Source Code Changes To Migrating scripts to Tcl 9
Login

Changes To Migrating scripts to Tcl 9

Changes to "Migrating scripts to Tcl 9" between 2023-11-07 23:20:40 and 2023-11-14 18:41:26

︙
159
160
161
162
163
164
165











166

167
168
169
170
171
172
173
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176

177
178
179
180
181
182
183
184







+
+
+
+
+
+
+
+
+
+
+
-
+







specified pattern instead rasiing an error. This is true irrespective of
the presence of the `-nocomplain` option which is still accepted but has
no significance. Any scripts that expect an error to be raised in such
cases will need to be modified to check for an empty list instead.

See [TIP 637](https://core.tcl-lang.org/tips/doc/trunk/tip/637.md).

## Removal of depreciated commands or arguments

These commands or arguments have been deprecated and have been removed from Tcl 9.
Scripts making use of these should be modified as below:

* Replace `case` with `switch`
* Replace `read -nonewline <chan>` with `read <chan> nonewline`
* Replace `read -nonewline <chan> <line>` with `puts <chan> <line> nonewline`

See [TIP 485](https://core.tcl-lang.org/tips/doc/trunk/tip/485.md)

## Deprecated `trace` subcommands `variable`, `vdelete`, `vinfo` have been removed
### Deprecated `trace` subcommands `variable`, `vdelete`, `vinfo` have been removed

These commands have been deprecated since Tcl 8.4 and have been removed from Tcl 9.
Scripts making use of these should be modified as below:

* Replace `trace variable` with `trace add variable`

* Replace `trace vdelete` with `trace remove variable`
︙
211
212
213
214
215
216
217
218
222
223
224
225
226
227
228








-
at `/` but need to iterate across all volumes.

* The paths within `auto_path` *may* point to locations within the `zipfs` volume.
These are not writable so any installers that copy files into that location will fail.
Installers should check for writable locations in any case but this change will
result in errors in installers that write to directories in `auto_path` without
these checks.