Proposed Tcl Changes

Octal Numbers

Invalid octal numbers (e.g., 08) have long been cause for confusion. At the least, the error message will be improved to alert users that a leading zero implies an octal number, which cannot contain digits eight or nine. We plan to introduce a tcl command that turns off octal number interpretation:

tcl useoctal boolean
						

At the same time, a new way to specify octal numbers will be added, probably oXXX.

We are considering a new way to specify decimal numbers, probably dXXX, that will force interpretation of XXX as decimal, even if it has leading zeros.

file channels

The file channels command will return a list of open I/O channels, which can be sockets, regular files, or channels created by extensions. It will take an optional pattern argument (e.g., sock*) to constrain the list.

Changing File Modify Times

Either a new command, file touch, or a change to file attributes -mtime option will be made to let you change the modification date on a file.

regsub -subst or -command

The combination of regsub and subst is so powerful, we want to make it perform even better. The -subst option to regsub will run subst over the result of regsub, but only over the parts that were generated by regsub. The input data that is not matched by regsub is untouched by the subsequent subst. This can eliminate the need to quote special Tcl characters in input, which takes extra regsub passes. The -command option passes the replacement string to a command before substitution into the result. You can achieve similar effects with both -subst and -command, so we may only implement one option.

A -start option will be added to regsub and regexp. This indicates a starting offset into the string being matched.

New glob options

The -dir, -join, -path, and -types options may be added to glob to make it easier to manipulate directories in a platform-independent manner.

Internationalization

There are still some improvements that can be made in Internationalization support, especially with respect to input methods.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.98.190