Strange miracles and wonders happen on the latest Vir Calc ver 2018 10 16
11-02-2018, 04:28 AM (This post was last modified: 11-02-2018 04:30 AM by John P.)
Post: #3
 John P Member Posts: 219 Joined: Dec 2013
RE: Strange miracles and wonders happen on the latest Vir Calc ver 2018 10 16
Hello,
Could anybody explain to me why:
When DIM is executed in programs returns:
1.DIM({1,2})-->{1,1}, {1,2} is not list with 1 element, but with 2. {1,1} would be if the list was {{1}}.
DIM({x,y})-->{1,1}, same as above.
2. DIM([1,2])-->{2}, OK for a list.
DIM([x,y])-->{1,1}, same as in 1 above, {1,1} is wrong dimension for 1D vector or list.

When DIM is executed in history, command line, it returns:
1. DIM({1,1})-->2, correct.
2. DIM([1,2])-->2, correct.
3. DIM({x,y})-->2, correct.
4. DIM([x,y])-->2, correct.
5. DIM([[1,2,3],[4,5,6]])-->[2,3], correct.
6. DIM({{1,2},{3,4}})-->[2,2],OK. matrix.
7. DIM({{1},{2,3,4}})-->{{1},{1,1,1}}, not OK it should be {2,{1,3}}.
8. DIM({[1,2],[3,4,5]})-->{{2},{3}}, looks OK.
9. DIM([[1],[2,3],[4,5,6]])-->Error:Syntax Error, OK.

There is some logic the DIM behaves on the command line, but in programs the way DIM works is inconsistent mildly speaking.

Could somebody who is responsible for the maintenance of HP CAS, I presume Mr. Parisse, explain why many commands behave in different way on the command line then while executed in programs. Logical answer would be very much appreciated. Thank you very much.
 « Next Oldest | Next Newest »

 Messages In This Thread Strange miracles and wonders happen on the latest Vir Calc ver 2018 10 16 - John P - 11-01-2018, 03:22 AM RE: Strange miracles and wonders happen on the latest Vir Calc ver 2018 10 16 - Tim Wessman - 11-01-2018, 03:59 AM RE: Strange miracles and wonders happen on the latest Vir Calc ver 2018 10 16 - John P - 11-02-2018 04:28 AM

User(s) browsing this thread: 1 Guest(s)