On 11/23/2009 2:12:53 PM, Mona Zeftel wrote:
== We are looking at the programming for Mathcad Prime, and are considering several options. One is to keep programming pretty much as it is in Mathcad 14, and enhance it with user suggestions.
== Another option is to put programming inside a box like the Solve Block box in Mathcad Prime. That would make it easier to do some things that users have been asking for:
I'm tempted to suggest that both forms are desirable.
== Disadvantages:
I agree with Richard ...
== * Can not be easily broken across pages
Why not? I'd settle for breaking between 2 adjacent lines.
== * harder to edit
So make it easier
🙂== * can not easily add comments on the same line
I can't see what the problem is here. There are many ways to skin this particular cat, eg a comment operator (displayed as, say, //) that appends itself to the end of the current line and presents a placeholder for the user to type a comment into. I vaguely remember there being a thread that presented several options for commenting existing code; perhaps one of these could be re-evaluated with the intent of making it look neater.
The User should be the prime focus of any development work in terms of 'ease' - but these comments tend to give the impression that developer difficulties are influencing things.
== We'd like to go with box version, but want to check if any of you see problems with it.
How will you handle loops - there is a clear need to distinguish between evaluating a set of equations sequentially for a given index (for & while loop) as opposed to evaluating each equation for the complete range of indices (range-variable evaluation)
In addition, there would still need to be a capability to block off if..otherwise sub-areas.
For example see
http://collab.mathsoft.com/read?63068,77 for a brief discussion of looping within boxes - the attached worksheet might be worth looking at:
http://collab.mathsoft.com/upload/Worksheet%20Looping%20Variant%201.mcd== Do you use inline programs inside equations?
Yes. I use them to carry out pre-processing on arguments to functions. A common use in M13/M14 is local function definition to allow a multi-argument function to be parameterized for 3D plot input (eg, if f(a,x,y) then write λ(x,y)←f(3,x,y) in a plot placeholder).
I've already posted some thoughts on 'boxes' (although I called them Rectangular Areas). I envisaged that they would act slightly differently to the way Spirit implements Solve boxes, eg
- the box would return a result, either the last one or via a specific 'return' statement
- the box would therefore allow itself to be assigned to a function definition, ie acting pretty much like a Mathcad 'component'.
- a box would, unless it's the rhs of a function definition, allow direct manipulation and creation of 'higher level' variables; the local definition operator could be used to limit the scope of variables to a box or its sub-boxes. Note: this would mean the retention of both the ← and := operators.
see thread
http://collab.mathsoft.com/read?114150,12which contains the following worksheets:
http://collab.mathsoft.com/upload/Hayward%20Chaotic%20Iteration%20v3%281%29.mcdhttp://collab.mathsoft.com/upload/ICW%20Example%281%29.mcdhttp://collab.mathsoft.com/upload/Rectangular%20Area%20demonstration%202%281%29.mcd