There is a code:

if (Mtext(stID) = True) or (Mtext(stID) = False) then... 

how to perform regardless of the result Mtext = True or False or

 if (Mtext(stID)) or not(Mtext(stID)) then... 

Is there an easier option?

  • 2
    Why not remove the check at all? - Anton Shchyrov
  • this condition (Mtext(stID) = True) or (Mtext(stID) = False) always true (well, unless your case is a ternary boolean) - KoVadim
  • @KoVadim condition may not be true Mtext(a: Integer): Variant result is Mtext(a: Integer): Variant - Kromster
  • In any case, the varian is converted to boolean. And it can not be a Schrodinger cat. Well, except for one case - if the function is not clean (for example, it says something like random> 0.5). - KoVadim
  • @KoVadim is not. Please note that there is a comparison with a bullet, and not a reduction to a bull. For example, Null can be compared, but not given. if NULL = True then .. else if NULL = False then .. else .. - the 3rd branch will work. I myself was surprised when I saw this in code, but it works that way. - Kromster

1 answer 1

how to perform regardless of the result Mtext = True or False

Like this:

 Mtext(stID); // if (Mtext(stID) = True) or (Mtext(stID) = False) then... 
  • thank. I completely forgot that you can do that) - BinkaM