[Pas2js] if-then-else structure issue

warleyalex warleyalex at yahoo.com.br
Sat Jan 27 21:55:32 CET 2018


while translating a ATM machine simulator do Pas2JS, I came across an issue

----------------------------
var getBalance: Integer = 0;
     lCor : Double;

begin

if (getBalance = 0.0) then
  lCor := $FF0000 //clGray
else
if (getBalance > 0.0) then
  lCor := $F0FFF0 //clHoneyDew
else
  lCor := $FFD700; //clGold

WriteLn(
 FloatToStr(lCor)
);
----------------------------

Fatal: Exception: TPasImplIfElse.AddElement if and else already set - please
report this bug




--
Sent from: http://pas2js.38893.n8.nabble.com/


More information about the Pas2js mailing list