Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
Is it bug or not?
Thank you for your quick reply. But I mean why do I have to define "c" in my last program 2 times? In worksheet and in program? Without it I can not get the right result. I think it would be right to define "c" one time in worksheet, isn't it?
It must be a bug, see below.
Mike
Thank you but my real task is looking like this:
it gives a correct result with the first (extra) line of the program... without it h0 = 0 inside program!!!!!!
PS: h0 has defined in worksheet above program
So have you got your solution now?
Mike
Yes! I've got my solution, but my question was "is it bug or not?" I mean defining the same variable (h0 in my examle) 2 (two) times. Is it right that a variable defined in worksheet before program is ZERO inside program???
Is it right that a variable defined in worksheet before program is ZERO inside program???
It's not see below. Wayne has given a good description of locally defined variables and variables defined at worksheet level.
Mike
I see, there is a bug, a rather nasty Boolean Bug.
I normally use argument lists, for which it works correctly, so havn't seen this
In addition to Mike's example, perhaps the following will help
Variables assigned outside and prior to a program definition are available inside a program.
Variables assigned inside a program are available inside the program only.
If you redefine c inside a program, it has that value in the program only, it does not effect the value outside the program, which is really good.
Thank you, I know about this form MC help. Look at my previouse post
So, is this thread is a bug report, or not? It would be great to correct this bug
For simple understanding:
Form MC help:
Local variables or functions defined with this operator may be assigned to values from the worksheet. For example, it's possible to define a:=2 in your worksheet, then define a local variable b ← a inside a program.
Mathcad 15.0 (M010 [MC15_M010_20110622])
PS: Does this bug manifests in other versions of MC? I do not know, because I've just begin to use MathCAD.
I would suggest upgrading your to the latest version of M15.
Mike
I think he wrote he is using M010 which as far as I know ist the latest version, isn't it
WR
I think he wrote he is using M010 which as far as I know ist the latest version, isn't it
Good spot, my bad.
Mike
Anyway, the next service release M020 is scheduled by PTC for Q2 2012.