Sorry, about the delay ... hadn't noticed your last response. PTC moved the old Collaboratory to their product Community web forum. Unfortunately, in doing so they didn't transfer all of the posts and there are many missing worksheets where they did, plus links that point to the old (non-existent) Collaboratory. I found just 2 threads with zdas04 ... both of which seemed reasonably polite and helpful. I have to confess that I didn't notice much of the boorish behaviour you describe in the old Collaboratory and the new Community (
) seems quite polite. From the sound of it, you probably ran into Jean Giraud, normally a helpful chap but he could be somewhat derogatory if he disagreed with things; he certainly had run-ins with some of the other 'senior' members and had some rather "individual" takes on what was permissible. Tom Gutman could be seen as somewhat abrupt and to the point occasionally, particularly if he thought people weren't engaging their brain cell, but he was very good value indeed - if Tom said it was so, then 99.9% of the time it was so and he was very much on the point! Sadly, neither of them are active in the PTC Community. You might like to give the Community a chance, lurk for a bit and see what you think?
As for the counter-intuitive features you mention, it may help to reflect that Mathcad started out as an electronic "maths whiteboard" rather than a programming tool - in fact, programming with for loops wasn't introduced until around version 6.
[ul]
[li]If constructs default to single line. I spent over an hour trying to find a way to make a block conditional before I finally found a quick book that did what I wanted. I was able to copy the example and make it work, but I never found how to do it from a blank line[/li]
[/ul]
It rather looks like the if-otherwise statement was supposed to resemble the standard conditional notation you find in many maths books rather than the conventional if-else structure; this would place the result before the if and the conditional after the if. To create more lines in the if statement, place your cursor in the result placeholder and press ']' or select 'Add Line' from the programming toolbar; the same goes for the otherwise. You can actually add more lines to the if's conditional clause using the same technique.
[ul]
[li]Where variables get passed out of the program. I have always assumed that if I assigned a program value to the variable to the right of the = sign, it would go (i.e, Output[i,j] <== PV) but that doesn't seem to work consistently. I finally built a program array the same size as the output array and did OutputTemp[i,j] <== PV, and on the very last line of the program I said Output <== OutputTemp and that worked. Only took 20 years to figure that one out.[/li]
[/ul]
I'm not quite sure what you mean, could you post an example (unless you're happy you've got the problem solved, but it may benefit somebody else with the same problem)?
[ul]
[li]Adding lines. I simply cannot figure out how to add a line without it indenting. What I finally started doing a few years ago is cutting a line at the level I wanted and then adding a line and pasting the cut item back. What a pain, but much less painful that arbitrarily adding 30 lines at every level and then deleting them if not needed[/li]
[/ul]
See the response to the if statement. Use the spacebar/arrow-keys to select the level you want and the Insert key to select the start/end of the selection. Then press ']' or 'Add Line' as many times as you need. You may find Mathcad Prime's programming style more to your liking; PTC took note of some the comments (complaints!) and revised the structure - I believe just pressing Return in a program creates a new line and all if blocks indent the result line.
[ul]
[li]The FOR construct seems to use different syntax than most range assignments. I do i=0,1;20 to say that I want to assign 0-20 inclusive incremented by 1 to "i". In the FOR construct you do 0;20 to do the same thing and it give you inconsistent results when you add the "1".[/li]
[/ul]I haven't noticed that; it seems to behave exactly as I'd expect (you can just do i:=0..20 to define a range variable running from 0 to 20 inclusive, Mathcad assumes you mean "0,1"). Can you give an example?
Error reporting is a problem with many applications and Mathcad does indeed suffer from its fair share of rather ambiguous or downright misleading error messages. I don't often use trace, preferring to place return statements at various points throughout a program to identify how far it's got and what it's done. However, trace can be very useful at times.