Errors G0157 & G0008

User ForumErrors G0157 & G0008
chokin asked 3 years ago

I'm new to Gauss and was recently learning my way through it with a couple a programs my co-author sent me. When I tried to run them this is what I got:

C:\gauss13\src\mathfn.src(383) : error G0157 : 'beta' : Illegal redefinition of matrix

C:\gauss13\src\mathfn.src(383) : error G0008 : 'proc beta(x,y)' : Syntax error

Any idea where to start? I'll get back to my co-author but perhaps she won't know the answer--she's using Gauss 9 and I have 13.





3 Answers
Best Answer
aptech Staff answered 3 years ago

I think what you are saying is that you changed the name of the beta variable in the program sent by your coauthor and left the beta procedure inside of mathfns.src alone. If this is what you are saying, then you do not need to make any changes or comments to mathfns.src. I think this is a good solution. I only suggested commenting out the procedure since that might make coordination with your co-author simpler if there is a large code base.

aptech Staff answered 3 years ago

GAUSS 13 has a beta function. GAUSS 9 did not. It looks like your code uses a variable called beta. If you do not anticipate the need for the beta procedure (at least in the short run), I would recommend commenting out the beta procedure. You will find it on line 383 of the file C:\gauss13\src\mathfn.src. Surround it with comments like this:

/**** Commented out to avoid conflicting with variable 'beta'
proc beta(x,y);
....code for beta function

Now the program should run.

One quick tip that may be helpful: You can quickly open mathfn.src to make the changes by entering:

edit mathfn.src

from the GAUSS command line.

chokin answered 3 years ago

I just changed the variable's name and it worked. Any difference with what you suggested? And if so, where should I write the comment exactly, on line 383? Thanx