Page 1 sur 1

idea, return the previous value when changing flags

Publié : dim. août 26, 2018 2:23 pm
par compsystems
Hi the configuration commands of the ti89, return the previous value and not the current one, this allows to store the flag in a variable and eliminate a call statement of the current flag for them restore


for example
flag_radianmode:=angle_radian(0); returns flag_radianmode -> 0 // current mode

best
flag_radianmode:=angle_radian(0); returns flag_radianmode -> 1 // previous mode


flag_simplify:= autosimplify(1); returns flag_simplify -> 1 // current mode
best
flag_simplify:= autosimplify(1); returns flag_simplify -> 2 // previous mode

The following two sentences could be replaced by a single
flag_simplify:=autosimplify(); returns for example flag_simplify -> 2 /
autosimplify(1);

flag_simplify:= autosimplify(1); returns flag_simplify -> 2 // previous mode

then to restore the flag
autosimplify(flag_simplify);