find and index functional cmd

Messages in english

Modérateur : xcasadmin

compsystems
Messages : 562
Inscription : sam. févr. 04, 2017 11:34 pm
Localisation : Colombia
Contact :

find and index functional cmd

Message par compsystems » ven. déc. 14, 2018 12:38 am

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_);

parisse
Messages : 5739
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: find and index functional cmd

Message par parisse » sam. déc. 15, 2018 7:11 am

What do you think is wrong?

compsystems
Messages : 562
Inscription : sam. févr. 04, 2017 11:34 pm
Localisation : Colombia
Contact :

Re: find and index functional cmd

Message par compsystems » sam. déc. 15, 2018 2:26 pm

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]

parisse
Messages : 5739
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: find and index functional cmd

Message par parisse » sam. déc. 15, 2018 5:43 pm

But that's what I get: [2,3]

compsystems
Messages : 562
Inscription : sam. févr. 04, 2017 11:34 pm
Localisation : Colombia
Contact :

Re: find and index functional cmd

Message par compsystems » dim. déc. 16, 2018 6:25 pm

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");

compsystems
Messages : 562
Inscription : sam. févr. 04, 2017 11:34 pm
Localisation : Colombia
Contact :

Re: find and index functional cmd

Message par compsystems » mar. déc. 18, 2018 7:57 pm

index("abracadabrant","c") [↵] 4 // PC version
index("abracadabrant","c") [↵] "Error" // Online version

parisse
Messages : 5739
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: find and index functional cmd

Message par parisse » mer. déc. 19, 2018 7:36 pm

Fixed.

compsystems
Messages : 562
Inscription : sam. févr. 04, 2017 11:34 pm
Localisation : Colombia
Contact :

Re: find and index functional cmd

Message par compsystems » sam. déc. 22, 2018 1:58 pm

Anoter problem

find("ab","abracadabrant") [↵] []

Répondre