I just noticed that code I wrote years ago to pass 4x4 arrays into and out of SUBs doesn't seem to specify the dimensions of the array in the sub. The manual says to include SIZE after the array name, but doesn't say what to do when there are more than one dimension, nor what to do if you have other variables to pass as well. In the following, C#() is 4x4. How do I specify that in the SUB? I suspect that PB gives me 10x10 by default, chewing up memory and slowing down my code.
CALL HOMCORD(0.,CompX!,CompY!,CompZ!,CompRoll!*Deg2Rad#,CompPtch!*Deg2Rad#,CompYaw!*Deg2Rad#,0.,CompC#())
SUB HOMCORD(byval S!,byval DX!,byval DY!,byval DZ!,byval Roll!,byval Pitch!,byval Yaw!,byval Dist!,C#(2))
DIM DYNAMIC A#(4,4),B#(4,4) 'local to this SUB only
(To satisfy the curiosity of lurkers like me, this is part of a CAD code and sets up Homogeneous Coordinate Transformations for viewing.)
------------------
CALL HOMCORD(0.,CompX!,CompY!,CompZ!,CompRoll!*Deg2Rad#,CompPtch!*Deg2Rad#,CompYaw!*Deg2Rad#,0.,CompC#())
SUB HOMCORD(byval S!,byval DX!,byval DY!,byval DZ!,byval Roll!,byval Pitch!,byval Yaw!,byval Dist!,C#(2))
DIM DYNAMIC A#(4,4),B#(4,4) 'local to this SUB only
(To satisfy the curiosity of lurkers like me, this is part of a CAD code and sets up Homogeneous Coordinate Transformations for viewing.)
------------------
Comment