'index':=1/0;

Messages in english

Modérateur : xcasadmin

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

'index':=1/0;

Message par compsystems » mer. sept. 12, 2018 4:17 pm

Hello, in xcas [a, b, c] [1]; always returns b, while in hpprime a or b depending on the index var flag, is it possible to incorporate this in xcas?

'index':=1; returns "[] index start 1"
[a,b,c][1];, returns a // ok

'index':=0; returns "[] index start 0"
[a,b,c][1]; returns b // ok

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

Re: 'index':=1/0;

Message par parisse » mer. sept. 12, 2018 6:05 pm

If you want indexes starting at 1, use [[ ... ]]

Répondre