difference between procedure and function??? which one should i use???
do they do diffrent things??
difference between procedure and function??? which one should i use???
do they do diffrent things??
[/URL
Simply put:
A function does something and tells you something back. Like function YourMom: string; In the function you do Result := 'l33t'; and if you say WriteLn(YourMom); it will write Leet.
On the other hand, a procedure will just do something, and won't "pay you back". Like ti will do it, and not tell you anything back
Get what I am saying? o.O
Send SMS messages using Simba
Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!
SCAR Code:Program Test;
Function YourMomsNameIs: String;
Begin //Text
Result := 'Eva';
End;
Function YourMomsAgeIs: Integer;
Begin //Number
Result := 54;
End;
Function YourMomIsAFemale: Boolean;
Begin //True or False
Result := True;
End;
Function YourMomWeightsThisMuch: Extended;
Begin //Float or extended number. Integer but with a decimal.
Result := 75.4;
End;
Begin
Writeln('Hi my moms name is ' + YourMomsNameIs + ' and is ' + IntToStr(YourMomsAgeIs)+' old. True means shes a woman ' + BoolToStr(YourMomIsAFemale)+
'she weights ' + FloatToStr(YourMomWeightsThisMuch)+' kilograms');
End.
Code:
- Narcle: I recall Jukka releasing a bunch of scripts like this before... Its how he rolls I think. rofl
- Solarwind: Dude, you are like... t3h s3x.
- Hy71194: JuKKa you're a machine! You released 3 scripts in 10 minutes! :O
- benjaa: woah.... Jukka is the man Guildminer pwns all
- NaumanAkhlaQ: And JuKKa Is my Her0!
oo i under stand i will stick with procedures for now.....
[/URL
There are currently 1 users browsing this thread. (0 members and 1 guests)