Ok, I dont think any of the tuts covered this:
if I state a function in a if statement like "If(blabla) then" will it still do blabla, or do I have to have it do blabla
lol
Ok, I dont think any of the tuts covered this:
if I state a function in a if statement like "If(blabla) then" will it still do blabla, or do I have to have it do blabla
lol
http://www.macrosoftinc.com/ ---WTF COPIERS!!!
you have to have it do blabla i dont think there is a way to make it not do it



Is that what you were asking?SCAR Code:program New;
function Hello: Boolean;
begin
writeln('Hello');
Result:= True;
end;
begin
if(Hello)then
Hello;
end.
i dk, I was asking, if I said
If(hello) then
watever
would it do hello?
http://www.macrosoftinc.com/ ---WTF COPIERS!!!
Yes it would.
(as bullzeye95's example proves)
Just for 100% percent clarification:
* It runs the function, and then validates if the function is true or false.SCAR Code:Program New;
function NumberRight: Boolean;
begin
if(3-3 = 0)then
begin
Result:= True;
end;
end;
begin
if(NumberRight)then // Check Comment *
Writeln('It was right!')
end.
-Knives
There are currently 1 users browsing this thread. (0 members and 1 guests)