http://groovy.codehaus.org/Scoping+and+the+Semantics+of+%22def%22#ScopingandtheSemanticsof%22def%22-Sowhatisdifferent%3F
Scripts are different in that assigning undeclared variables puts them in the binding which it appears methods also have access to. Regards Scott 2008/8/2 Ean Schuessler <[EMAIL PROTECTED]>: > Looks like the variables were never declared? Groovy is soft-typed but it > still wants you to def a variable before its used. > > ----- "Scott Gray" <[EMAIL PROTECTED]> wrote: > >> I really don't think garbage collection (if that's what you mean) has >> anything to do with the problem, it's simply a matter of >> understanding >> how groovy's variable scope differs from what we had in bsh. I'm >> going to play around with it a bit more when I get a chance. > > -- > Ean Schuessler, CTO Brainfood.com > [EMAIL PROTECTED] - http://www.brainfood.com - 214-720-0700 x 315 >
