Re: [Openvas-discuss] Nasty variable scoping booby-trap

2008-05-31 Thread Jan-Oliver Wagner
On Monday 19 May 2008 00:50, Lukas Grunwald wrote: Jan-Oliver Wagner wrote: 1) Change the nasl compiler to force all variables to be explictly declared; 2) Default undeclared variables to a local scope; 3) Have a lint style checker that examined functions and

Re: [Openvas-discuss] Nasty variable scoping booby-trap

2008-05-18 Thread Jan-Oliver Wagner
Thomas, On Thursday 15 May 2008 23:30, Thomas Reinke wrote: Some thoughts we've had:     1) Change the nasl compiler to force all variables to be        explictly declared;     2) Default undeclared variables to a local scope;     3) Have a lint style checker that examined functions and    

Re: [Openvas-discuss] Nasty variable scoping booby-trap

2008-05-18 Thread Jan-Oliver Wagner
On Thursday 15 May 2008 23:53, Michel Arboi wrote: On Thu, May 15, 2008 at 11:30 PM, Thomas Reinke [EMAIL PROTECTED] wrote: Variables in a function in NASL do not _need_ to be declared. Isn't it magical? I guess it is more a conceptual element of the NASL programming language. Its not a new

Re: [Openvas-discuss] Nasty variable scoping booby-trap

2008-05-18 Thread Michel Arboi
On Sun, May 18, 2008 at 11:14 PM, Jan-Oliver Wagner [EMAIL PROTECTED] wrote: Are you saying that Thomas is wrong? Or at least, not very precise. Maybe I already had it. Are you saying you even implemented this already? IIRC, since the beginning of NASL2. Why are you in doubt? I am not in

Re: [Openvas-discuss] Nasty variable scoping booby-trap

2008-05-18 Thread Lukas Grunwald
Jan, Jan-Oliver Wagner wrote: Thomas, On Thursday 15 May 2008 23:30, Thomas Reinke wrote: Some thoughts we've had: 1) Change the nasl compiler to force all variables to be explictly declared; 2) Default undeclared variables to a local scope; 3) Have a lint style checker

Re: [Openvas-discuss] Nasty variable scoping booby-trap

2008-05-18 Thread Thomas Reinke
Michel Arboi wrote: On Sun, May 18, 2008 at 11:14 PM, Jan-Oliver Wagner [EMAIL PROTECTED] wrote: Are you saying that Thomas is wrong? Or at least, not very precise. Maybe I already had it. Are you saying you even implemented this already? IIRC, since the beginning of NASL2. Why are

Re: [Openvas-discuss] Nasty variable scoping booby-trap

2008-05-15 Thread Michel Arboi
On Thu, May 15, 2008 at 11:30 PM, Thomas Reinke [EMAIL PROTECTED] wrote: Variables in a function in NASL do not _need_ to be declared. Isn't it magical? If the variable is not declared at all, it will be created, automatically, with a global scope. Or maybe not? Who knows? 1) Change