Done Id -> 1

Messages in english

Modérateur : xcasadmin

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

Done Id -> 1

Message par compsystems » ven. nov. 10, 2017 1:20 am

Hello, BP, please assign the variable Done the value of 1, with the purpose of evaluating evalb(Done) return true or for replace the "Done" output with 1, in this way it is easier to compare with 1 or true, instead of the string "Done"

Thanks

Code : Tout sélectionner

f(x):={
  ...;
  return Done;

}:;
1: f(x); returns "Done"

1: f(x); returns Done

------------

2: 3+4:; returns "Done"

1: 3+4:; returns Done
evalb(ans(-1)); true

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

Re: Done Id -> 1

Message par parisse » ven. nov. 10, 2017 3:02 pm

I don't understand. If you want a variable Done to be assigned to 1, why don't you do it yourself with Done:=1?

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

Re: Done Id -> 1

Message par compsystems » sam. nov. 11, 2017 2:59 am

It would have to do it in each code, while if it is global in the catalog, this would be a universal value

I am a lover of self-documented codes

Code : Tout sélectionner

return 1;
best

Code : Tout sélectionner

Return Done;

Répondre