Error Highlight not picking up the right 'error' - Messages
The error highlighting has worked GREAT so far, but today I ran into a case where it is highlighting the wrong equation variable. The error is actually that other variables I am citing are below the equation, but it seems that the first equation variable is getting flagged.
What error message does it show?
Will fix it soon.
Best regards.
Then, when the function is evaluated below that, the function is highlighted, and the evaluation is halted too. So the error is flagged and the evaluation of the function is stopped.
Previously, I believe that the function was not evaluated, so that it generated no error. Similarly, the function results would be evaluated after the variable definition.
This is may be a real problem for those of us who define a bunch of equations well above where they get used if the evaluation of them is done after the dependent variables are evaluated or defined.
Wrote...
Previously, I believe that the function was not evaluated, so that it generated no error. Similarly, the function results would be evaluated after the variable definition.
This is may be a real problem for those of us who define a bunch of equations well above where they get used if the evaluation of them is done after the dependent variables are evaluated or defined.
Hi sinneD. Without the actual worksheet it's hard to say, but I guess that this it's a feature of SMath (*), and you can prevent the immediate evaluation enclosing CheckIA with a line(...).
Best regards.
Alvaro.
(*) see https://en.smath.com/forum/yaf_postsm7966_Function-as-a-program.aspx#post7966 for example.
error-highlight.sm (12 KiB) downloaded 42 time(s).
Previously, I recall that the function would evaluate at the end no matter where the function was defined or its evaluation status. I realize that I am asking it to evaluate before all the variables are defined.
Wrote
I realize that I am asking it to evaluate before all the variables are defined.
Why are you doing that? If you remove the evaluation then CheckIA_LC2 at the end evaluates just fine.
1. When I write logic/evaluations like this, Once I make the first on, I copy-paste for the additional cases I want to check right below the first instance of the equation. That way, if I had to edit the formula at a later date, all the instances would be grouped together.
In this instance, I the thing that am trying to Check Inter-Action for Load Case 2, hence the variable name CheckIA_LC2. The LC1 one was a page or two before that. LC1 and LC2 were one over the other where I first defined LC1.
2. I also usually leave them on the 'right page' that does not print because I only want the results at the end.
I moved the function definition to this part of the calc to try and figure out why the last evaluation was not working and condense the screenshot.
The major point I am trying to make is that previous versions of SMath might throw an error at the function level because the variables were not defined, but did not disable evaluation that is called after the variables have been made.
Wrote
The major point I am trying to make is that previous versions of SMath might throw an error at the function level because the variables were not defined, but did not disable evaluation that is called after the variables have been made.
Hi. For that behavior you need the line, as in the attached: in red because can't evaluate numerically at this position in the worksheet, but give the correct result many times when it's variables have values.
Best regards.
Alvaro.
not the best approach. Modular stand alone pieces is better and easier to debug.
You seem to complicate matters, then complain.
Smath kernel is exceptionally powerful and convivial, long learning curve.
I take exception to your response, especially your statement that I am nothing more than a 'complicator' and a 'complainer'. That goes against the respectful, collaborative discourse that I have grown to expect from this community.
The calculation sheets that I am using as examples to highlight the issues I am seeing I developed many years ago, under different versions and I am re-utilizing and updating them now with the latest manufacturer information.
I believe that there is a problem with this new feature, and I am discovering it through a sequence of repetitive calculations. Those of us who are NOT the best programmers are the ones who benefit the most from this, but unfortunately the ones who are going to experience the bugs/issues more since we are the ones who make the most mistakes.
Here is another example, written from SCRATCH that again highlights an issue with the error checking. I am trying to re-write an old MathCad sheet I wrote under version 11 in SMath.
The only copying and pasting going on here is I build complicated formulas incrementally to ensure that I can back check the terms by hand before the final equation and output. You can see the progression in the worksheet.
I am mystified why the equation is halting evaluation and noting that the N.cols variable is undefined, yet I can call it above and below the statement.
https://i.imgur.com/oRWzAWy.png
PileRedux_Factor.sm (6 KiB) downloaded 45 time(s).
PileRedux_Factor_ser.sm (7 KiB) downloaded 41 time(s).
sergio

this work for me.
Thank you both for your responses.
The original MathCad i wrote maybe 12-13 years ago. I am trying to update it.
The equation was defined for graphing using the series i and j.
At the end, I find the explicit value by defining the actual numbers.
I am confused by why the EXACT same code works on your end but not on mine.
Wrote
I am confused by why the EXACT same code works on your end but not on mine.
It's not the exact same code. Sergio uses symbolic evaluation (Ctrl + .) Same as right click clicking expression, changing optimization to symbolic.
do this in two step and then no error is show
PileRedux_Factor_CBG.sm (20 KiB) downloaded 40 time(s).
Best Regards
Carlos
-
New Posts
-
No New Posts