Skip to main content
23-Emerald V
April 15, 2022
Question

Range arguments are partially back in Mathcad Prime 8 ..

  • April 15, 2022
  • 1 reply
  • 2787 views

Whilst playing around with some array extraction functions, I noticed that Mathcad Prime 8 partially restores Mathcad 15's ability to directly use ranges as function arguments.

 

2022 04 15 a.png

 

2022 04 15 b.png

 

2022 04 15 c.png

 

2022 04 15 d.png

 

2022 04 15 e.png

 

2022 04 15 f.png

 

Stuart

1 reply

23-Emerald V
April 17, 2022

Here's vec modified to work in Mathcad Express 8 and operating over nested range arguments:

 

2022 04 17 a.png

 

I created an IsAtom function to determine whether an argument is a scalar, function or string and assumed that anything else potentially has multiple elements (ie, is an array or a range).  There have been several occasions when an IsRange function would have been nice.

 

With my usual unbridled optimism, I hope the ability to use simple ranges as functions arguments is a foretaste of things to come - that is, fully stepped ranges and arbitrary sequences as arguments.   Indeed, I'd like to see proper, arbitrary sequences as a new data type.

Stuart

23-Emerald V
April 25, 2022

This is strange, I was just about to reply to a reply but the reply has disappeared (the original email is in my mail app, so I have good reason to suspect that I wasn't hallucinating).   I suspect it may have been regarded as spam.   However, it did link to a somewhat relevant Prime 3.1 thread where I noted the breaking of sequences in for loops: https://community.ptc.com/t5/PTC-Mathcad/Prime-3-1-Problem-with-until-function/m-p/402110/highlight/true#M157785

 

89670_pastedImage_234

 

Still broken in Prime 8 ...

 

Stuart

25-Diamond I
April 25, 2022

@StuartBruff wrote:

This is strange, I was just about to reply to a reply but the reply has disappeared (the original email is in my mail app, so I have good reason to suspect that I wasn't hallucinating). 

It could have been  an automatically generated posting of a spam bot.