View Full Version : Counting each time the script repeats successfully
how can we count each time a script has performed successfully and write it in the debug box?
Recursive
05-18-2012, 06:49 AM
Inc(Count);
writeln(Inc(Count) + 'number of runs');
{Increases count by 1 each time it is successful}
incex(Count, Up);
writeln(Incex(Count, Up) + 'number of items made');
{Increases count by the number passed to up
So if you pass 2 to Up and Count is at 5, after this runs, Count = 7}
procedure Main;
begin
repeat
DoSomething;
ClearDebug;
Inc(Count);
writeln(Inc(Count) + 1);
until(false);
end;
is this correct? because its not compiling correctly, and ihave no idea what i have done wrong
edit: nvm figured what i done wrong, thanks anyway
When you you solve it on your own, I suggest you to post the ix for everyone (If someone is having some what same problem).
Fixed version.
program new;
var
Count :Integer;
procedure Main;
begin
repeat
//DoSomething;
ClearDebug;
Inc(Count);
WriteLn(IntToStr(Count));
until(false);
end;
begin
Main;
end.
~Home
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.