Subject: Request for Comment: file extension semantics change - DN [1]


Scott Stanton <scott.stanton@Scriptics.com> - 02 Feb 1999 - comp.lang.tcl

 The current behavior of "file extension" is to return the extension
 characters and any preceding periods.  This leads to some odd corner
 cases.  In particular "file extension foo..o" returns "..o", not ".o".
 This behavior was selected explicitly in an earlier version of Tcl in
 order to support some Unix systems that used "..o" extensions.

 Under Windows, this behavior does not make sense.  An extension should
 never contain more than one ".".  It is not clear that the current
 behavior makes sense on most Unix systems, either.  I would like to
 propose that we change the behavior so that "file extension" always
 returns the string beginning with the last period in the name.  So,
 "file extenson foo..o" would return ".o".

 Does anyone know of a reason that this change would be a problem?

 --Scott

Last modified
1999-09-27

(195.108.246.50)

Note: you are looking at
the snapshot of an old wiki
- much of this information
is likely to be very outdated