[Pas2js] if-then-else structure issue
Michael Van Canneyt
michael at freepascal.org
Sat Jan 27 23:22:00 CET 2018
On Sat, 27 Jan 2018, warleyalex via Pas2js wrote:
> 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
Today there was an issue in this direction fixed. Please update SVN and
recompile. (or wait for a new update to appear)
Michael.
More information about the Pas2js
mailing list