Post Reply 
Existing CAS commands --> Prime discussion
12-14-2018, 02:16 AM (This post was last modified: 12-15-2018 03:00 PM by compsystems.)
Post: #57
RE: Existing CAS commands --> Prime discussion
The index functional command is not documented but it works. Please, make it visible in the catalog menu.

Help text.

Index acts as a system variable and as a functional command,

For functional command:
Index() returns the first position of an object in a list, a string or a set, if it does not find the object returns an error message.

index( List/String/Set, Object )

Examples:
LIST:
index:=0:; index([9,8,-1,8,9,8,7],8) [↵] returns 1
index:=1:; index([9,8,-1,8,9,8,7],8) [↵] returns 2

SET:
index:=0:; F_ := set[ H_,E_,L_,L_,O_];
F_ => set[ H_,E_,L_,O_]; the multiplicity of L_ is eliminated
index(F_,O_) [↵] returns 3
index(F_,L_) [↵] returns 2
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Existing CAS commands --> Prime discussion - compsystems - 12-14-2018 02:16 AM



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