1 Pages (6 items)
Equivalent Programming Language - Messages
#1 Posted: 1/23/2021 12:13:01 PM
#2 Posted: 1/23/2021 5:18:19 PM
WroteHi,
What is the equivalent programming language in Smath vs MathCAD. I dont see RETURN, FOR with OTHERWISE and the local definition arrow.
Hi. Return it's an unstructured instruction, which breaks the flow in a program. You don't have it in SMath, then you must to do a similar process like translate a BASIC program into pascal or c++.
Otherwise is the else in SMath, which appear always as part of if instruction. That's a difference with Mathcad, where you can have an if without otherwise. In smath you can't have an if without the else clause.
In your code also there are an inline if; smath don't have that option.
Mathcad have origin=0, smath is origin=1.
Finally, there are not any for with otherwise neither mathcad nor smath. In your code it could be confusing the use of if, but all of the otherwise are because one if, never because any for loop.
This code could replicate the mathcad function, but because isn't clear where ends the for loop, I'm not sure if it is correct. You need to do some debug here. Notice also that mathcad can have for loops without "ending" or "close" with a result the line, but smath can't.
Best regards.
Alvaro.
1 users liked this post
sergio 1/23/2021 5:26:00 PM
#3 Posted: 1/23/2021 7:22:41 PM
#4 Posted: 1/23/2021 7:43:56 PM
WroteI don't see RETURN, FOR with OTHERWISE and the local definition arrow.
1. "return" ... collected otherwise
2. "local definition" ... simply :=
3. "if/else" within forloop ... YES
Page5 Search.sm (24 KiB) downloaded 24 time(s).
#5 Posted: 1/24/2021 9:14:17 AM
WroteWhat is the equivalent programming language in Smath vs MathCAD
The gigantic Smath repository Samples is essentially very many
Mathcad documents re-coded Smath.
A job of patience like in the attached recreating the two data sets involved.
That particular one toke one day + ... so much rewarding.
Not so easy on some documents that don't even work Mathcad ORIGIN 1 !!!
I vaguely understand that your 3 modules are searching something within.
Can you show more from your Mathcad result, some of us might help.
Cheers ... Jean
Utilities Lookup TREASURY_2 Locate Array1 Array2.sm (68 KiB) downloaded 34 time(s).
#6 Posted: 1/24/2021 2:30:35 PM
Cheers Guys for the guidance and help.
I will give it a go and come back if I bump into any problems
I will give it a go and come back if I bump into any problems
1 Pages (6 items)
-
New Posts
-
No New Posts