I just came upon a situation where this would be useful. So how about auto conversion rules from int/bye/etc into single dimension arrays of said type ?
... you could do this.
Currently youd have to do this instead..
... incase in [ ].
Not really that important just an idea.
It would mean you can have a function that accepts an array or a single value. (without having to add the [ and ])
Below is an example similar to what made me think about this.
Function overloading would probably be a better way to do this anyways...
Function test(array:Float[]) Notify array[0] End Function Local array:Float[] = [666.999] test(10.123) test(array)
... you could do this.
Currently youd have to do this instead..
Function test(array:Float[]) Notify array[0] End Function Local array:Float[] = [666.999] test([10.123]) test(array)
... incase in [ ].
Not really that important just an idea.
It would mean you can have a function that accepts an array or a single value. (without having to add the [ and ])
Below is an example similar to what made me think about this.
Type Tanimation Field image:timage Field frames Field delays:Int[] Method SetAnimationFrameDelays(ndelays:Int[]) Local slot:Int If ndelays.length = 1 'only 1 frame delay is passed, apply same delay to every frame For slot = 0 Until delays.length delays[slot] = ndelays[0] Next Else 'an array o delays passed, each frame has unique delay time delays = ndelays End If End Method End Type Local a:tanimation = New tanimation a.SetAnimationFrameDelays(20) a.SetAnimationFrameDelays([20,20,20,1000,20])
Function overloading would probably be a better way to do this anyways...