variant ops



variant_ops
Smart pascal source code
var vi: Variant = 5; var vf: Variant = 5.5; var vs: Variant = 'world'; WriteLn(vf * 3.5); WriteLn(Round(vf * 3)); WriteLn(3.5 * vf); WriteLn(Round(3 * vf)); WriteLn(vi * 3.5); WriteLn(Round(vi * 3)); WriteLn(3.5 * vi); WriteLn(Round(3 * vi)); WriteLn('hello ' + vs); WriteLn(vs + ' hello'); WriteLn(55 / vf); WriteLn(vf / 5); WriteLn(10 - vf); WriteLn(vf - 5); WriteLn(vi - vf); WriteLn(vf - vi); WriteLn(-vi); WriteLn(-vf); const v1: Variant = 5; WriteLn(2 * v1); {<<< RESULT - CONSOLE LOG >>> ----------------------------- 19.25 16 19.25 16 17.5 15 17.5 15 hello world world hello 10 1.1 4.5 0.5 -0.5 0.5 -5 -5.5 10 ----------------------------- {<<<<<<<<< THE END >>>>>>>>>}