What I would like do do (which I am not sure if it is possible) is make a subdomain variable (declared from a type : endtype command) and use user created variables (like DIM).
I am VERY new to programming and Darkbasic but I am learning fast. I'm still on the math stage but I'm trying to extend my knowledge of the math portion as much as I can before I even see graphics
Here is my example of what I'm trying to do (I get an error at the DIM part):
TYPE exnumbers
a AS INTEGER
b AS INTEGER
c AS INTEGER
endtype
snum AS exnumbers
rem "DIM"ing
DIM snum.a(5)
DIM snum.b(5)
DIM snum.c(5)
rem Declaring values
for n = 1 to 5
snum.a(n) = rnd(100)
next n
for n = 1 to 5
snum.b(n) = rnd(100)
next n
for n = 1 to 5
snum.c(n) = rnd(100)
next n
rem The PRINT sequence
for n = 1 to 5
print "Numbers: "; snum.a(n) ;", "; snum.b(n) ;", "; snum.c(n) ;"."
next n
wait key
end
Ventures of the worlds around us are only limited by imagination.