array [Boolean] of Integer/String



array [Boolean] of Integer/String
Pas2JS pascal source code
const s: array [Boolean] of string = ['F', 'T']; var b: array [Boolean] of Integer; v: boolean; BEGIN b[false] := 10; b[true] := 20; v := false; Writeln(b[1 = 1]); // 20 Writeln(b[v]); // 10 Writeln(s[v]); // F Writeln(s[not v]); // T