Skip to main content
1-Visitor
April 11, 2016
Solved

What is the programming paradigm in Mathcad?

  • April 11, 2016
  • 3 replies
  • 5086 views

I have some experience in C language, and I know the structured programming, and in the structured programming there are no the "functions": break and continue as there are in MathCad programming.

Prog_Mathcad.png

In Mathcad the programing paradigm is object oriented, declarative or another?

Best answer by StuartBruff

rking-2 wrote:

I have some experience in C language, and I know the structured programming, and in the structured programming there are no the "functions": break and continue as there are in MathCad programming.

In Mathcad the programing paradigm is object oriented, declarative or another?

Mathcad is a mix of declarative and functional.  Functions are (almost) first class objects and can be passes as arguments and returned from programs / functions.   With the addition of a few simple functions to cater for implicit loops, I can often write a worksheet in a functional form that transfers well to, for example, Haskell.

I suggested object-oriented as an extension about a decade ago (my, how tempus has fugited!). 

Stuart

3 replies

23-Emerald V
April 11, 2016

rking-2 wrote:

I have some experience in C language, and I know the structured programming, and in the structured programming there are no the "functions": break and continue as there are in MathCad programming.

In Mathcad the programing paradigm is object oriented, declarative or another?

Mathcad is a mix of declarative and functional.  Functions are (almost) first class objects and can be passes as arguments and returned from programs / functions.   With the addition of a few simple functions to cater for implicit loops, I can often write a worksheet in a functional form that transfers well to, for example, Haskell.

I suggested object-oriented as an extension about a decade ago (my, how tempus has fugited!). 

Stuart

19-Tanzanite
April 11, 2016

C has both break and continue statements, and they do the same things as the break and continue statements in Mathcad.

Trying to compare C to Mathcad is kind of like trying to compare a fish to a dog. They are so far apart that it probably doesn't make much sense. If you do want to make such a comparison, then in addition to what Stuart has said Mathcad worksheets can also include things that are best thought of as objects (such as graphs and controls). I certainly wouldn't call it "object oriented" though.

Perhaps we could give you a better answer if we knew the reason behind your question.

rking-21-VisitorAuthor
1-Visitor
April 12, 2016

Hello Richard

The C language has statements "break" and "continue" of course the C language, but they are not accepted by the structured programming, the book "C how to program" of Deitel and other say it.

My question is motivated to find a language with the same paradigm of Mathcad programing (or at least the same statements) and practice because I have not found much information programming in Mathcad.

23-Emerald IV
April 12, 2016

"because I have not found much information programming in Mathcad":

Look up the "Help" in the "Resources" tab and open the help book on "Programs". There you will find information on programming and some examples.

There's also a "Programming Tutorial" in the "Tutorials" book in the "Help".

Success!

Luc

24-Ruby III
April 12, 2016

Video "Programming with Mathcad Prime" on PTC's Learning Exchange site: Tutorial: Programming