Proposed Tcl Changes

   

Practical Programming in Tcl & Tk, Third Edition
By Brent B. Welch

Table of Contents
Chapter 54.  Tcl/Tk 8.3


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 \0oXXX.

We are considering a new way to specify decimal numbers, probably \0dXXX, 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.


       
    Top
     



    Practical Programming in Tcl and Tk
    Practical Programming in Tcl and Tk (4th Edition)
    ISBN: 0130385603
    EAN: 2147483647
    Year: 1999
    Pages: 478

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net