Question 1: Is there a way to return multiple values from a Function? I realize that most only want to return one number, but take this for example:
Function AttackMath(Str,Endur)
Str+Endur=Attack
EndFunction Attack
Function MagAttackMath(MagPow,Str)
MagPow+Str=MagAttack
EndFunction MagAttack
Function SpeedMath(Dex,Endur)
Dex+Endur=Speed
EndFunction Speed
Right now, I have about 9 of those little mini-functions. I'd like to cram them all togehter into something like this:
Function StatMath(Str,Dex,Endur,MagPow)
Str+Endur=Attack
MagPow+Str=MagAttack
Dex+Endur=Speed
EndFunction Attack,MagAttack,Speed
According to my father, who used Visual Basic, from version 4 to 7, such a thing was possible, and the DBpro help also mentions being able to return multiple numbers (Quote:They can accept multiple parameters and return values). However, I am lost as to how one can go about doing so, for DBPro dosn't like the ways I've attempted to do so.
Question 2: Can I pass an Array into a function like so:
Function PrimStatFunc(PrimStats)
PrimStats(1,1) + PrimStats(1,2) = return
EndFunction Return
This question is more out of curiousity than necessity. While a confirmation on it's worlabiltiy would allow some simplification of code, I would do fine without.
Question 3: Can I modify a User Defined Type Array from within a Function, like so:
Type DaDa
Hel AS INTEGER
Bello AS STRING
Gella AS Integer
EndType
Dim Array AS DaDa
Array.Hel=0
Array.Bello=""
Array.Gella=0
Perform (Array)
print Array.Hel
Print Arra.Bello
Print Array.Gella
Function Perform(ArrayName)
ArrayName.Hel=2
ArrayName.Bello="ByeBye"
ArrayName.Gella=6
EndFunction ?
This is my most important question, for it alone could de-HardCode chunks of my code. I am a fond user os the UDT (User Defined Type), for it allows for easy to remember coding, which is very important for someone who once forgot his own birthday

! Not only that, it allows me to mix different data types within arrays, and if this question is said to be yes, it will allow for some very easy coding
And Finally,
Question 4: Can I keep Subroutines within seperate files? I know that Functions can be kept in seperate files can be kept there, but I can't remember(not surprisingingly) if subroutines can be kept there. Also, are there any plans to make the seperate files more C++ like, such as being able to keep actual pieces of code in seperate files?
Thank you all for (hopefully) answering my questions.
Regards,
Ryan Wilson