For some reason my integer variable will not increase (using inc(i)), but only in certain ways..
First, I'll show this:
Simba Code:
procedure mt(var TimeMarker: longword); //mark time, got tired of typing out marktime
begin
TimeMarker := GetSystemTime();
end;
Now onto the problem:
Simba Code:
procedure inctest();
var
t:Longword;
test:Integer;
begin
writeln(test); //prints 0
inc(test);
writeln(test); //prints 1
mt(t);
writeln(test); //prints 0
end;
As you can see, after mt(t), the value goes back to 0. If I remove mt(t), it works fine. Or, if I swap the variable initialization and leave in mt(t), like this:
Simba Code:
procedure inctest();
var
test:Integer;
t:Longword;
begin
writeln(test); //prints 0
inc(test);
writeln(test); //prints 1
mt(t);
writeln(test); //prints 1
end;
Why is it doing this? I am using simba 1.2