From msz at astrouw.edu.pl Tue Jan 12 16:18:56 2010 From: msz at astrouw.edu.pl (Michal Szymanski) Date: Tue, 12 Jan 2010 15:18:56 +0100 Subject: octal numbers in tcsh Message-ID: <20100112141856.GA17276@astrouw.edu.pl> Hello, Somewhere about 6.14, tcsh changed the interpretation of numbers formed with a leading zero, the changelog says: - Fix strings which begin with '0' are not recognized as octal numbers Resolves: #438109 I am not sure whether this has resolved any real issue. Surely enough, it has broken a bunch of scripts of mine and some of my colleagues. While this seems to be a bit too late to complain, I would still argue against this change. 1. The recognition of "octal" numbers is not mentioned anywhere in the man page. 2. AFAIK no tcsh expression can give octal result, so the use of octal constants is hardly useful. 4. Tcsh does not recognize hex numbers (like 0x2a), breaking something that I would call 'programming symmetry' - most programming-related environments I know either do know both octal and hex constants or none of them (like old Fortran). 5. The change may break (and actually breaks) many scripts. Fixing them requires using external programs like 'sed' - I do not see any tcsh internal mechanism that could easily strip leading zeros from a string. with best regards, Michal. -- Michal Szymanski (msz at astrouw dot edu dot pl) Warsaw University Observatory, Warszawa, POLAND