Matrix in Field Type

Blitz3D Forums/Blitz3D Programming/Matrix in Field Type

KuRiX(Posted 2005) [#1]
Hi One more Time!

I know i can make this:

Type incrediblemaximumpowertype

Field Vector%[10]

end type

But... if i want to make a matrix or more than 1 dimension?

That doesn't work:

Field Matrix%[10][10]
Field Matrix%[10,10]

So, is it possible? How?


Duckstab[o](Posted 2005) [#2]
Type incrediblemaximumpowertype

Field Vector%[10]

end type

Dim matrix.incrediblemaximumpowertype(10,10)

simple Multi array

think types in types help to do this but rusty tbh


KuRiX(Posted 2005) [#3]
Oh, Thanks. Interesting point of View. It is not exactly what i where looking for, but could do the job.

Cheers!


Beaker(Posted 2005) [#4]
You can do something like this:
Type thing 
	Field Vector%[100] 
	Field blah
End Type
 
th.thing = New thing 
For x = 0 To 9
	For y = 0 To 9
		th\Vector[x*10+y]= Rand(1000)
		Print x*10+y
	Next
Next



Rook Zimbabwe(Posted 2005) [#5]
Cool! Never thought of that... but can you update the array in the type?
-RZ


Techlord(Posted 2005) [#6]
Multi-Dimensional Arrays