Auto Arrays & casting

BlitzMax Forums/BlitzMax Programming/Auto Arrays & casting

Tom(Posted 2005) [#1]
Local a:Double[][] = [[0.5,0.5],[1.0,1.0]] 'error
Local a:Double[][] = [[0.5!,0.5!],[1.0!,1.0!]] 'works

It's the same with Floats & Integers.

Could we have the compiler do necessary casting instead of having to specify it? Or is there a *deep* reason we need to be specific?

It's just a small nuisance :)

Local vert:Double[][] = ..
[[-0.5!, -0.5!, -0.5!],..
[ 0.5!, -0.5!, -0.5!],..
[ 0.5!, -0.5!, 0.5!],..
[-0.5!, -0.5!, 0.5!],..
[-0.5!, 0.5!, -0.5!],..
[ 0.5!, 0.5!, -0.5!],..
[ 0.5!, 0.5!, 0.5!],..
[-0.5!, 0.5!, 0.5!]]

Cheers
Tom


Robert(Posted 2005) [#2]
I second this - it would be much appreciated Mark :)


Who was John Galt?(Posted 2005) [#3]
3rd.

On a similar note, if you have a function called with a hard coded constant, will that constant be created with the correct data type, or is it re-cast at runtime?