Re: add a way to declare global variables

2009-12-14 Thread Bernd Eggink
Am 12/14/09 13:37, schrieb Marc Herbert: Bernd Eggink a écrit : To avoid misunderstandings, let me add that you are right (only) with respect to variables being used _without_ declaration. OK, but not having to explicitly "declare" variables is a feature that most people expect from dynamic la

Re: add a way to declare global variables

2009-12-14 Thread Marc Herbert
Bernd Eggink a écrit : > To avoid misunderstandings, let me add that you are right (only) with > respect to variables being used _without_ declaration. OK, but not having to explicitly "declare" variables is a feature that most people expect from dynamic languages, so you can hardly blame them fo

Re: add a way to declare global variables

2009-12-12 Thread Bernd Eggink
Am 12.12.2009 21:41, schrieb Chet Ramey: On 12/12/09 5:28 AM, Bernd Eggink wrote: Am 10.12.2009 10:40, schrieb konsolebox: I hope the development team will also consider adding a way in bash to declare global variables inside a function perhaps either with an option in typeset or declare like

Re: add a way to declare global variables

2009-12-12 Thread Chet Ramey
On 12/12/09 5:28 AM, Bernd Eggink wrote: > Am 10.12.2009 10:40, schrieb konsolebox: > >> I hope the development team will also consider adding a way in bash to >> declare global variables inside a function perhaps either with an >> option in typeset or declare like -g (same as zsh) and/or a builti

Re: add a way to declare global variables

2009-12-12 Thread Stephane CHAZELAS
2009-12-12, 12:37(-05), Chet Ramey: > 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

Re: add a way to declare global variables

2009-12-12 Thread Chet Ramey
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 funct

Re: add a way to declare global variables

2009-12-12 Thread Bernd Eggink
Am 12.12.2009 15:25, schrieb DennisW: On Dec 12, 4:24 am, Bernd Eggink wrote: Am 12.12.2009 02:11, schrieb Matthew Woehlke: konsolebox wrote: I hope the development team will also consider adding a way in bash to declare global variables inside a function perhaps either with an option in typ

Re: add a way to declare global variables

2009-12-12 Thread Bernd Eggink
Am 12.12.2009 15:25, schrieb DennisW: On Dec 12, 4:24 am, Bernd Eggink wrote: Am 12.12.2009 02:11, schrieb Matthew Woehlke: konsolebox wrote: I hope the development team will also consider adding a way in bash to declare global variables inside a function perhaps either with an option in typ

Re: add a way to declare global variables

2009-12-12 Thread DennisW
On Dec 12, 4:24 am, Bernd Eggink wrote: > Am 12.12.2009 02:11, schrieb Matthew Woehlke: > > > konsolebox wrote: > >> I hope the development team will also consider adding a way in bash to > >> declare global variables inside a function perhaps either with an > >> option in typeset or declare like

Re: add a way to declare global variables

2009-12-12 Thread Bernd Eggink
Am 12.12.2009 11:24, schrieb Bernd Eggink: Am 12.12.2009 02:11, schrieb Matthew Woehlke: konsolebox wrote: I hope the development team will also consider adding a way in bash to declare global variables inside a function perhaps either with an option in typeset or declare like -g (same as zsh)

Re: add a way to declare global variables

2009-12-12 Thread Stephane CHAZELAS
2009-12-12, 11:28(+01), Bernd Eggink: > Am 10.12.2009 10:40, schrieb konsolebox: > >> I hope the development team will also consider adding a way in bash to >> declare global variables inside a function perhaps either with an >> option in typeset or declare like -g (same as zsh) and/or a builtin >>

Re: add a way to declare global variables

2009-12-12 Thread Chris F.A. Johnson
On Sat, 12 Dec 2009, Bernd Eggink wrote: > Am 12.12.2009 02:11, schrieb Matthew Woehlke: > > konsolebox wrote: > > > I hope the development team will also consider adding a way in bash to > > > declare global variables inside a function perhaps either with an > > > option in typeset or declare lik

Re: add a way to declare global variables

2009-12-12 Thread Bernd Eggink
Am 10.12.2009 10:40, schrieb konsolebox: I hope the development team will also consider adding a way in bash to declare global variables inside a function perhaps either with an option in typeset or declare like -g (same as zsh) and/or a builtin function like global as similar to local. I seco

Re: add a way to declare global variables

2009-12-12 Thread Bernd Eggink
Am 12.12.2009 02:11, schrieb Matthew Woehlke: konsolebox wrote: I hope the development team will also consider adding a way in bash to declare global variables inside a function perhaps either with an option in typeset or declare like -g (same as zsh) and/or a builtin function like global as sim

Re: add a way to declare global variables

2009-12-11 Thread Matthew Woehlke
konsolebox wrote: I hope the development team will also consider adding a way in bash to declare global variables inside a function perhaps either with an option in typeset or declare like -g (same as zsh) and/or a builtin function like global as similar to local. I thought variables in functio