indsav(what,where) bug?

User Forumindsav(what,where) bug?
MV asked 4 years ago

Try that:


it returns a vector:



instead of returning the correct:






4 Answers
Aptech Staff answered 4 years ago

It appears to be a bug limited to the case of the first input being a string array and the second being just a string. It has been posted on the bug list for development to look at.

MV answered 4 years ago

Thanks. Actually in the case you mentioned it returns 1 instead of . and . instead of 1. There should be a typo in the "underline" code. Do you know I can modify he underline code of this command manually?

Aptech Staff answered 4 years ago

Unfortunately, the code for this command cannot be modified by the user, but here is a procedure (with an example) that you can use as a workaround until a patch is released with this bug fixed:

what = "1"$|"2"$|"3";
where = "1";
print indsav(what, where);
print "---------------";
print indsavtmp(what, where);

proc (1) = indsavtmp(what, where);
//If where is a string, force it
//to be a string array as workaround
 if type(where) == 13;
    where = where$|where;
retp(indsav(what, where));

type is a command that returns the type of a variable. The number 13 means a string.

Aptech Staff answered 4 years ago

This fix has been implemented in version 13.0.6 and is now available for download.