the reason I mention this is it is better to use int if that is what it is going to be used for other wise you don't have type checking.
BJ Freeman sent the following on 8/1/2008 8:10 PM: > looks like def is undefined till used > unless you do a string or int > also looks like they use casting. > > Scott Gray sent the following on 8/1/2008 7:57 PM: >> 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 >>> >> >> > > > >
