On 12/12/09 5:24 AM, Bernd Eggink wrote:

> It's the other way round. Regarding typeset and declare, the man page
> says: " When used in a function, makes  each name local, as with the
> local command. " So within a function, typeset, declare, and local are
> synonyms. Using 'local' outside a function is an error, so IMHO this
> command is completely redundant. It _would_ make some sense, however, if
> its counterpart 'global' existed, as it could help clarify the intended
> usage of the variable.

It might be considered redundant, but just consider it a more mnemonic
synonym for declare/typeset.  `local' appeared in an earlier version of
the Posix standard, though `typeset' never did.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/


Reply via email to