Variable and Function Names Can't Start With Number - Old Worksheet that now produces an error - Сообщения
Any help would be greatly appreciated.
Thanks!
Simple Beam - Function.sm (64 КиБ) скачан 62 раз(а).
there are known issues with the iterator name of functions like sum, if that variable was previously defined; just clear it before using inside sum.
Simple Beam - Function.sm (64 КиБ) скачан 83 раз(а).
Alternatively I could have used a different variable name?
WroteI see, Thank you!
Alternatively I could have used a different variable name?
You can, but you might experience the issue again if that variable is used somewhere and then you call your function
Clear() is the most reliable way to act, and won't change the logic of your function even when this issue will be solved
1. I seem to get a bad result (it is incorrect) as noticed by the units. I'm not sure what's going on there.
2. Where is 'n' being defined in the original function? Or do I need to clear(n) before every sum?
Thanks again!
Wrote1. I seem to get a bad result (it is incorrect) as noticed by the units. I'm not sure what's going on there.
2. Where is 'n' being defined in the original function? Or do I need to clear(n) before every sum?
==================================
To me, "Units" is the greatest pest ever invented. I worked all my life with
Engineering formulas "pencil/paper" ... formulas designed in the appropriate units.
Just a comment
There is no error message... what about changing the exponent 'n' in fsin(x,a,n)
with something less confusing. Whether your version needs 'Sum' be locally defined
or not ? ... you must try the example posted before.
Clear(n) does nothing. To clear 'x' in a project, instruct like this
x:=Clear(x) ... don't know if it clears within program ?
If there is error in the construction and if the construction is too involved
it may not report any error at all ... same with Mathcad, can't trace back.
What about a minimal pieces to help checking individual results. would be
much easier to debug.
If you want to clean from the gyzmas '#': easy and not easy
Put the selection on the right of a#, press F8 to select all [highlighted gray]
Press backspace to remove the # ... it does not clean an exponent and may not
clean a long construction. Check each has been cleaned, if not clean manually.
[Old work sheet that now produces error]
========================================
That's what you have to isolate first, it was created 5346 or earlier version.
If so => the suspect is the Sum(s). Personally, I have dozens of those.
Good thing we know how to doctor.
WroteThanks for you help. A couple questions:
1. I seem to get a bad result (it is incorrect) as noticed by the units. I'm not sure what's going on there.
Not really sure what's going on there while the units are correct, but they shows that something is messed up. What is going different is that nested systems are no more joined (at least for the el() function).
You can use a couple of nested el(), that however are correct for how the result is built (a system of systems)
Wrote2. Where is 'n' being defined in the original function?
In the for loops before the sums. Try it on the canvas, the iterator variable is available with his last value outside the loop (by design).
WroteOr do I need to clear(n) before every sum?
before any sum in which you might not have the control on what is defined before; In this case, the first sum() inside the function, whatever you use or not use n locally, because n might be used on the canvas. If you still want to use n in amid of 2 sums, you have to clear it again before the second sum. However if you forget it the error status shows that something is gone wrong.
WroteAttached is an older worksheet for simple span beams. It used to "work". However, now I receive an error "Variable and Function Names Can't Start With Number". I can't seem to find this error.
Any help would be greatly appreciated.
=============================================
Please, check the attached:
1. Not a case of clearing anything
2. Changed the nSum for mSum
3. Removed all gyzmas #
4. NO error message
I understand nothing in that kind of work,
but results make sense even with units.
Simple Beam - Copy.sm (63 КиБ) скачан 45 раз(а).
Wrote@Jean and @Davide thank you both very much for your contributions. I think I understand now.
Do you have the right results ? That was the question.
If NOT, you may have to debug the program piecewise.
Cheers, Jean
WroteYes, i do, thank you.
====================
Nice you have the right result c/w units.
wrt the error message: I can't reproduce it anymore 6179.
It seems it has repaired itself, maybe some left over
from the coding ... similar left over codes in Mathcad 11.
Cheers collab, Jean
-
Новые сообщения
-
Нет новых сообщений