Skip to main content

2 replies

12-Amethyst
February 8, 2012

Valery,

I don't think the assignment statement (with the arrow) allows a program to be assigned, only a mathematical expression.

The following would work,

assign.JPG

There is no need to define a "subroutine" or program construct within another. They can be defined individually and then used within each other as I have shown above.

24-Ruby IV
February 8, 2012

Harvey Hensley wrote:

Valery,

There is no need to define a "subroutine" or program construct within another. They can be defined individually and then used within each other as I have shown above.

Thanks, I know it,

but I want to have a program built from separate debugged modules without user functions!?

LocalVar-Return-Error-1.png

19-Tanzanite
February 8, 2012

Not so much an error as a convention. The "return" operator stops the whole program, not just the module. Remove the first "return" in your examples and the results are as expected.

Alan

1-Visitor
February 8, 2012

Very strange behavior.

Mike

24-Ruby IV
February 8, 2012

MikeArmstrong wrote:

Very strange behavior.

Mike

In Mathcad MM and Mathcad Prime Minister all is OK - see http://communities.ptc.com/docs/DOC-2513