HP Forums
[CAS] seq and .. cmds - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: [CAS] seq and .. cmds (/thread-6910.html)



[CAS] seq and .. cmds - compsystems - 09-23-2016 05:54 PM

Hi, sorry for my bad English

lst0:=seq(k,k,1,3,1); returns [1,2,3] OK
[type(lst0), TYPE(lst0)]; returns [DOM_LIST,4] // OK
3*lst0; returns [3,6,9] // OK,IS SAME 3*[1,2,3]; -> [ 3,6,9]

now using doudle dot cmd

lst1:=seq(k,k=1..3,1); returns
[1,2,3] with conteiners [ ] apparently on the history view

now goto the entry line
[^](key up) {copy} menu, disappear the conteiners [] WHY?
1,2,3
3*lst1; returns 18 WHY? // 3*1*2*3 = 18

[type(lst1), TYPE(lst1)] returns
[DOM_LIST,
"TYPE(lst1) Error: Bad Argument Value"]

should be [DOM_LIST, 14.CAS TYPE]


RE: [CAS] seq and .. cmds - Tim Wessman - 09-23-2016 06:13 PM

Because one is a vector and one is a sequence. Basically, sequences are not supported well because we have no good way to distinguish them at this point.


RE: [CAS] seq and .. cmds - compsystems - 08-24-2018 01:09 AM

FIXED =)

CONCAT(seq(k,(k=2 .. 30),7), seq(k, (k=7 .. 31),7)); returns [2,9,16,23,30,7,14,21,28]