This is a function I thought I would make when I was bored...
It's kinda fun to play with for about 1 min
Won't work without boolean at the end but keeps giving me "result not used"
any help with that woudl be apreciated
This is a function I thought I would make when I was bored...
It's kinda fun to play with for about 1 min
Won't work without boolean at the end but keeps giving me "result not used"
any help with that woudl be apreciated
What exactly do you want to make?
The best way to contact me is by email, which you can find on my website: http://wizzup.org
I also get email notifications of private messages, though.
Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
Documentation | Source | Simba Bug Tracker on Github and Villavu )
My (Blog | Website)
I just want to make it count...which it already does
but I don't want it to give me "result not used"
SCAR Code:program new;
procedure CountBy(Number,Times,WaitTime: Integer);
var
a,b: Integer;
begin
a:=0;
b:=0;
repeat;
a:=a+Number;
b:=b+1;
WriteLn(IntToStr(a));
Wait(WaitTime);
until(b+1 > Times);
end;
begin
CountBy(1, 3, 1);
end.
I changed it to a procedure, procedures don't return anything; they just do what they're told.
Functions on the other hand return something (Boolean, Integer, String).
In your procedure you didn't need to return anything..![]()
if you want it to return something then put
Result := 'what you want returned'
so for a number its
function HeyThere : integer;
begin
Result:= 5;
end;
The truth finally came out...
Thanks for telling me about putting it as a procedure nielsie95...
And thanks Mat for telling me about results
There are currently 1 users browsing this thread. (0 members and 1 guests)