How do i get Scar to say the result?
such as:
SCAR Code:Writeln('Found : '+ Result);
How do i get Scar to say the result?
such as:
SCAR Code:Writeln('Found : '+ Result);






The result of a function?
Depends what the result is. Result is just like a local type variable. When writing a line to debug using WriteLn you need the input to be a string. So you'll need to convert the variable information to a string:
So depending on the Result type,
SCAR Code:Integer - Writeln('Found' + IntToStr(Result));
String - WriteLn('Found' + Result);
Boolean - WriteLn('Found' + BoolToStr(Result));
Extended - WriteLn('Found' + FloatToStr(Result));
If you are using 3.20 you don't need (Int/Bool/Float)toStr.



You do if you're adding a non-string to a string. Ex. writeln(1); would work, but writeln('1' + 1); wouldn't.
There are currently 1 users browsing this thread. (0 members and 1 guests)