Auto Arrays & casting
BlitzMax Forums/BlitzMax Programming/Auto Arrays & casting
| ||
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 |
| ||
I second this - it would be much appreciated Mark :) |
| ||
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? |