Page 1 sur 1
find and index functional cmd
Publié : ven. déc. 14, 2018 12:38 am
par compsystems
Hello BP, the find and index functional commands are not working
D_ := set[ "H", "E", "L", "L", "O"];
find("L",D); find("O",D_);
E_ := [ "H", "E", "L", "L", "O" ];
find("L",E_); find("O",D_);
index("L",E_);
Re: find and index functional cmd
Publié : sam. déc. 15, 2018 7:11 am
par parisse
What do you think is wrong?
Re: find and index functional cmd
Publié : sam. déc. 15, 2018 2:26 pm
par compsystems
a list of numbers or symbols, FIND CMD if it returns a list of the positions of an object to be searched, but a list of strings, FIND CMD returns an error
G_ := [ H,E,L,L,O]
find( L, G_ ) [↵] [2,3]
E_ := [ "H", "E", "L", "L", "O" ]
find( "L", E_ ) [↵] " Error: Bad Argument Value" => [2,3]
Re: find and index functional cmd
Publié : sam. déc. 15, 2018 5:43 pm
par parisse
But that's what I get: [2,3]
Re: find and index functional cmd
Publié : dim. déc. 16, 2018 6:25 pm
par compsystems
in the PC version did not work, reset cache works in the online version,
but the result of the third instruction is not displayed, that is, the output of index(E_,"L"); is not shown , Is this a bug?
test
E_ := [ "H", "E", "L", "L", "O" ]:;find( "L", E_ );index(E_,"L");
Re: find and index functional cmd
Publié : mar. déc. 18, 2018 7:57 pm
par compsystems
index("abracadabrant","c") [↵] 4 // PC version
index("abracadabrant","c") [↵] "Error" // Online version
Re: find and index functional cmd
Publié : mer. déc. 19, 2018 7:36 pm
par parisse
Fixed.
Re: find and index functional cmd
Publié : sam. déc. 22, 2018 1:58 pm
par compsystems
Anoter problem
find("ab","abracadabrant") [↵] []