this is my main loop
however it doesnt work, i know if i put true/false in the until line then it would work, but how do i make it repeat itself until a certain amount of time?Code:begin SetUpSrl; repeat kick; until(300); end.
this is my main loop
however it doesnt work, i know if i put true/false in the until line then it would work, but how do i make it repeat itself until a certain amount of time?Code:begin SetUpSrl; repeat kick; until(300); end.
Try this:
Simba Code:procedure Example;
var
T : Integer;
begin
MarkTime(T);
while (TimeFromMark(T) < 1500) do
begin
Wait(100);
end;
WriteLn(ToStr(T));
end;
Last edited by RISK; 12-11-2011 at 05:54 AM. Reason: Corrected the "Write" line to be proper for this example.
mind explaing what each code does?
Here:
Simba Code:procedure Example;
var
T : Integer; // Makes "T" an integer
begin
MarkTime(T); // Uses the integer "T" to mark the time that has passed in milliseconds
while (TimeFromMark(T) < 1500) do // While the value (The time) of integer "T"
begin // is less than "1500", do this:
Wait(100); // Waits 100 milliseconds
end;
WriteLn(ToStr(T)); // Writes the value of "T"
end;
There are currently 1 users browsing this thread. (0 members and 1 guests)