SRL Archive - NOTA

Lol i was just being stupid


All that is man

2009-09-08 06:25:20


type
lol = boolean;
procedure writelnarray(aos: array of variant);
var i: integer;
begin
for i := 0 to high(aos) do
writeln(aos[i]);
end;
begin
writelnarray(['lol', 1, 'ohai der', true, lol]);
end.

and the debug:


Successfully compiled (49 ms)
lol
1
ohai der
True
26
Successfully executed

lol := 26?

Lance

2009-09-08 07:31:13

thats weird.. lol is a boolean. it should have returned 0 or False o.O

Sabzi

2009-09-08 17:45:02

I don't think lol is declared correctly.
However I don't know why it returns 26.
But just make it a const.
const
lol = True;
Or to a variable.
var
lol: Boolean;
Then you have to set it to True if you want because it's default False.