Resources

Error G0156: Illegal redefinition of procedure

0

I had an error in my code where I was using a variable before I had assigned it a value, essentially like this:

new;

x = myvar;
myvar = 5;

In this example the variable myvar did not yet have a value, so I understand that it is incorrect. However, GAUSS returned the error message: G0156: illegal redefinition of procedure. This is confusing to me as I do not have a procedure named myvar. Why am I getting this error message?

Tags: asked November 14, 2013
aptech
227

1 Answer

0
accepted

When GAUSS encounters a new symbol that it does not know about, it starts out with the assumption that this new symbol is a procedure. That is why the error comes back as illegal redefinition of procedure.

The main point to remember, however, is that if GAUSS returns an error message that says “redefinition”, then your program has referenced that symbol earlier on. To find it you just need to search towards the top of the program for that symbol name.

aptech
227