View Full Version : Is this the same thing?
Is this:
ExpGained := ExpGained + 387;
The Same as This:
Inc(ExpGained + 387);
Thanks
~John
No, inc does simply increase an integer with one.
program Test;
{$i srl/srl.simba}
procedure Test;
var
ExpGained, ExpGained2: Integer;
begin
ExpGained := (ExpGained + 387);
WriteLn('ExpGained: '+IntToStr(ExpGained)+'');
IncEx(ExpGained2, 387);
WriteLn('ExpGained2: '+IntToStr(ExpGained2)+'');
end;
begin
SetupSRL;
Test;
end.
IncEx does increase an Integer with a number you can specify.
Inc(ExpGained + 387) will also give a compiling error.
Script above:
SRL Compiled in 16 msec
ExpGained: 387
ExpGained2: 387
Successfully executed.
Just so you know:
This:
ExpGained := ExpGained + 387;
IS the Same as This:
IncEx(ExpGained, 387);
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.