I've run into this before and it seemed to be some sort of issue with white space perhaps. It occurs when I copy/paste an older macro and make a slightly different version of it with a different name. Even if I then delete the new macro and return to my old "macro.inc" type of file, the error remains.
At times it seems the only way around it is to manually type the entire macro. Is this a PB bug or am I doing something wrong? Any way around it?
If I insert a new macro via copy/paste in between other macro definitions I get the "Macro Mismatch with Code Position" error. If I place it at the end of my "macros.inc" file instead, I get a "statement expected" error at MACRO Macro_Matrix_Times_Matrix_Base0, immediately before the (.
Even if I copy/paste a macro from earlier in the file another location in the file, then delete the original, I'll get these same problems.
EDIT: Forgot to add I'm using PB 8.0.0033. The problem occurs in both the PB Editor and my usual JellyFish Pro.
I've also had other sorts of errors occur when copying/pasting in different manners or to different places.
------------------
Todd Wasson http://PerformanceSimulations.Com
PowerBasic Racing Simulator http://performancesimulations.com/files/ToddSim7a.wmv
[This message has been edited by Todd Wasson (edited October 23, 2005).]
At times it seems the only way around it is to manually type the entire macro. Is this a PB bug or am I doing something wrong? Any way around it?
If I insert a new macro via copy/paste in between other macro definitions I get the "Macro Mismatch with Code Position" error. If I place it at the end of my "macros.inc" file instead, I get a "statement expected" error at MACRO Macro_Matrix_Times_Matrix_Base0, immediately before the (.
Even if I copy/paste a macro from earlier in the file another location in the file, then delete the original, I'll get these same problems.
Code:
MACRO Macro_Matrix_Times_Matrix_Base0(ResultMatrix, Mat1, Mat2) ResultMatrix(%X,%X) = Mat1(%X,%X) * Mat2(%X,%X) +_ Mat1(%X,%Y) * Mat2(%Y,%X) +_ Mat1(%X,%Z) * Mat2(%Z,%X) ResultMatrix(%X,%Y) = Mat1(%X,%X) * Mat2(%X,%Y) +_ Mat1(%X,%Y) * Mat2(%Y,%Y) +_ Mat1(%X,%Z) * Mat2(%Z,%Y) ResultMatrix(%X,%Z) = Mat1(%X,%X) * Mat2(%X,%Z) +_ Mat1(%X,%Y) * Mat2(%Y,%Z) +_ Mat1(%X,%Z) * Mat2(%Z,%Z) ResultMatrix(%Y,%X) = Mat1(%Y,%X) * Mat2(%X,%X) +_ Mat1(%Y,%Y) * Mat2(%Y,%X) +_ Mat1(%Y,%Z) * Mat2(%Z,%X) ResultMatrix(%Y,%Y) = Mat1(%Y,%X) * Mat2(%X,%Y) +_ Mat1(%Y,%Y) * Mat2(%Y,%Y) +_ Mat1(%Y,%Z) * Mat2(%Z,%Y) ResultMatrix(%Y,%Z) = Mat1(%Y,%X) * Mat2(%X,%Z) +_ Mat1(%Y,%Y) * Mat2(%Y,%Z) +_ Mat1(%Y,%Z) * Mat2(%Z,%Z) ResultMatrix(%Z,%X) = Mat1(%Z,%X) * Mat2(%X,%X) +_ Mat1(%Z,%Y) * Mat2(%Y,%X) +_ Mat1(%Z,%Z) * Mat2(%Z,%X) ResultMatrix(%Z,%Y) = Mat1(%Z,%X) * Mat2(%X,%Y) +_ Mat1(%Z,%Y) * Mat2(%Y,%Y) +_ Mat1(%Z,%Z) * Mat2(%Z,%Y) ResultMatrix(%Z,%Z) = Mat1(%Z,%X) * Mat2(%X,%Z) +_ Mat1(%Z,%Y) * Mat2(%Y,%Z) +_ Mat1(%Z,%Z) * Mat2(%Z,%Z) END MACRO
I've also had other sorts of errors occur when copying/pasting in different manners or to different places.
------------------
Todd Wasson http://PerformanceSimulations.Com
PowerBasic Racing Simulator http://performancesimulations.com/files/ToddSim7a.wmv
[This message has been edited by Todd Wasson (edited October 23, 2005).]
Comment