Smart pascal source code
var v: Variant;
var s: String;
var f: Float;
var i: Integer;
var b: Boolean;
s := 'abcd';
v := s;
WriteLn(v);
v := 'efgh';
s := v;
WriteLn(s);
WriteLn(v);
f := 1.234;
v := f;
WriteLn(v);
v := 5.678;
f := v;
WriteLn(FloatToStr(f));
WriteLn(FloatToStr(v));
i := 1234;
v := i;
WriteLn(v);
v := 5678;
i := v;
WriteLn(IntToStr(i));
WriteLn(IntToStr(v));
b := True;
v := b;
WriteLn(v);
v := False;
b := v;
WriteLn(b);
WriteLn(v);
{<<< RESULT - CONSOLE LOG >>>
-----------------------------
abcd
efgh
efgh
1.234
5.678
5.678
1234
5678
5678
True
False
False
-----------------------------
{<<<<<<<<< THE END >>>>>>>>>}
function FloatToStr$_Float_(i) { return i.toString() }
function FloatToStr$_Float_Integer_(i,p) { return (p==99)?i.toString():i.toFixed(p) }
function WriteLn(value) {
if (window.console) { window.console.log(value); } };
var v,
s = "";
var f = 0;
var i = 0;
var b = false;
/* <<< main JS >>> */
s = "abcd";
v = s;
WriteLn(v);
v = "efgh";
s = String(v);
WriteLn(s);
WriteLn(v);
f = 1.234;
v = f;
WriteLn(v);
v = 5.678;
f = Number(v);
WriteLn(FloatToStr$_Float_(f));
WriteLn(FloatToStr$_Float_(Number(v)));
i = 1234;
v = i;
WriteLn(v);
v = 5678;
i = parseInt(v,10);
WriteLn(i.toString());
WriteLn((parseInt(v,10)).toString());
b = true;
v = b;
WriteLn(v);
v = false;
b = (v?true:false);
WriteLn(b);
WriteLn(v);