cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

symbolic for (each) loop error

SOLVED
Highlighted
Visitor

symbolic for (each) loop error

Using the for programming expression in "for each" mode is a useful mode when iterating over an array and the index of an element is not a concern.  The mode works under the numeric processor when used in a free-standing program and inside a function.

However, when using the symbolic processor, the mode only works in a free-standing program and not in a function (where it is much more useful).

This is a long standing error in Mathcad.  Has it been fixed in Prime?  Can it be fixed in the next Mathcad 15 update?

Stuart

1 ACCEPTED SOLUTION

Accepted Solutions

Re: symbolic for (each) loop error

It doesn't even work if the matrix is freshly defined inside the program

And, no - the bug wasn't fixed in Prime, at least not in Prime 3.0

Obviously a for-loop is interpreted/implemented differently in the symbolics and insist on a sequence like first value, (optional second. value) and end value.

Did the symbolic eval work in MC11 with Maple?

Werner

5 REPLIES 5

Re: symbolic for (each) loop error

It doesn't even work if the matrix is freshly defined inside the program

And, no - the bug wasn't fixed in Prime, at least not in Prime 3.0

Obviously a for-loop is interpreted/implemented differently in the symbolics and insist on a sequence like first value, (optional second. value) and end value.

Did the symbolic eval work in MC11 with Maple?

Werner

Re: symbolic for (each) loop error

Now I am further puzzled:

Mathcad 15 M030:

Prime 3.0

Prime was set to "English" using "/culture:en-US" but the error message still is in German. Something like "Object reference not set to an object instance".


Werner

Re: symbolic for (each) loop error

Werner Exinger wrote:

It doesn't even work if the matrix is freshly defined inside the program

No, it doesn't ... I forgot to add that as an example.

And, no - the bug wasn't fixed in Prime, at least not in Prime 3.0

Thanks.  I didn't think it would be, but (being Primeless for at least the next few months) I thought I'd check.

Obviously a for-loop is interpreted/implemented differently in the symbolics and insist on a sequence like first value, (optional second. value) and end value.

But only inside a function; not even defining the function as a local function works.  It seems happy enough when run as a worksheet-level program, though.

Did the symbolic eval work in MC11 with Maple?

I can't remember that far back! 

Stuart

Re: symbolic for (each) loop error

Hi Stuart.

Following example let's me think that the bug it is related with the procedence of the argument as a global variable.

Best regards.

Alvaro.

Flat.gif

Re: symbolic for (each) loop error

> But only inside a function

Its not the function itself but the combination of using a variable for the matrix in side a function. As shown above it works OK if the matrix is placed directly in the for loop.