error message G0528 more returns than targets


I'm trying to run a code in GAUSS 12 with CML. I get an extremely weird error message: "error G0528 : More returns than targets". I cannot find this error in the current (or past) GAUSS manual and also not in the CML manual. Does anybody know what exactly this error is?



1 Answer


In the message, "more returns than targets", 'returns' are the number of variables that a function returns and 'targets' are the number of variables that you have assigned to be returned from a function. For example, the GAUSS function eigv has two returns. The first return is the eigenvectors and the second is the eigenvalues. A correct call would look like this:

x  = rndn(5,5);
{ eig_vec, eig_val } = eigv(x);

Whereas the code below will cause the error "more returns than targets". The error will occur because the function eigv returns two variables, but the code only assigns one target variable (eig_val in this case):

x  = rndn(5,5);
eig_val= eigv(x);

If your code specified three returns for eigv, like this:

x  = rndn(5,5);
{ eig_vec, eig_val, extra_return } = eigv(x);

you would receive the error: "fewer returns than targets", because the function has two returns, but your code specifies three target variables to be assigned from the eigv function.

You must login to post answers.

Have a Specific Question?

Get a real answer from a real person

Need Support?

Get help from our friendly experts.


Thank you for your interest in the GAUSS family of products.

© Aptech Systems, Inc. All rights reserved.

Privacy Policy | Sitemap