it actually makes the arrays the size you enter! so it just puts your array-size code into the new method? if you add the new method, it doesn't compile and points to field a[
Strict
Type t
Field b
Field a[ Int(Input()) + moo(Self) + b]
'Method New()
' Print "hi?"
'End Method
EndType
Local i:t=New t
Print "length is "+i.a.length
Print i.a[1]
Print i.a[9]
Print
Local j:t=New t
Print "length is "+j.a.length
Print j.a[1]
Print j.a[9]
WaitKey
End
Function moo(z:t)
z.b=2
Print "MEEEEERRRR"
'Print z.a[1] 'that cant be good
'z=New t 'that is just bad
Return 1
End Function
|