Question: why Maple internal code does this check?

noticed that in some places Maple does this check

`dsolve/IC/implicit/explicit` := proc(Y, x, ICs, isol, unable_to_make_explicit)
local tmp, esol, N, sol, n, ic, ZNN, znn, remain, types_requiring_verification;
   1*! if _EnvAllSolutions <> false then
   2       _EnvAllSolutions := true
       end if;
   3   if _EnvExplicit <> false then
   4       _EnvExplicit := true
       end if;

Why is the above check done?

Since _EnvAllSolutions can be either true or false, then If it is not false, it must be already true. So why check in first place?

The same for _EnvExplicit

The whole code can be removed altogether as not needed. 

Or is it possible these flags can have values other than true or false? But then it means the code which assigned such value to them is wrong in first place and this should have been cought before.

Or is it possible these flags do not have any values when Maple starts? And this is why the check is made?

ps. I just checked and it seems this is why the check is there, when Maple starts these have no values at all

restart;
print(_EnvAllSolutions)
                        _EnvAllSolutions

So the code seems to be doing this check because of this?
 

Maple 2025.1

 

Please Wait...