1. Is it necessary to set the result of a function at the beginning? I remember seeing it done when I first started programming and have been doing it on autopilot ever since, but it really seems unnecessary in most situations.
Simba Code:
function waitForX(x:Object):Boolean;
begin
Result := false;
while(not(find(x)))do {Just an example, I don't made infinite loops like this}
wait(250);
Result := true;
end;
2. Is it possible to overload certain commands such as break()? I'd like to have something like:
Simba Code:
while(not(findX()))do
begin
if(time > 5000)then
break(y, -1, 'took too long');
end;
Instead of:
Simba Code:
while(not(findX()))do
begin
if(time > 5000)then
begin
searchObj := y;
log(-1, 'took too long');
break();
end;
end;
3. Is it possible to create objects/classes? I saw a thread where someone did do it, but I was unable to do it myself.