hedgewars/uUtils.pas
branchwebgl
changeset 8850 ae8a957c69fd
parent 8847 ff7fbab7cd56
child 9127 e350500c4edb
equal deleted inserted replaced
8847:ff7fbab7cd56 8850:ae8a957c69fd
   192 function IntToStr(n: LongInt): shortstring;
   192 function IntToStr(n: LongInt): shortstring;
   193 begin
   193 begin
   194 str(n, IntToStr)
   194 str(n, IntToStr)
   195 end;
   195 end;
   196 
   196 
   197 function  StrToInt(s: shortstring): LongInt;
   197 function StrToInt(s: shortstring): LongInt;
   198 var c: LongInt;
   198 var c: LongInt;
   199 begin
   199 begin
       
   200 {$IFDEF PAS2C}
       
   201 val(s, StrToInt);
       
   202 {$ELSE}
   200 val(s, StrToInt, c);
   203 val(s, StrToInt, c);
   201 {$IFDEF DEBUGFILE}
   204 {$IFDEF DEBUGFILE}
   202 if c <> 0 then
   205 if c <> 0 then
   203     writeln(f, 'Error at position ' + IntToStr(c) + ' : ' + s[c])
   206     writeln(f, 'Error at position ' + IntToStr(c) + ' : ' + s[c])
       
   207 {$ENDIF}
   204 {$ENDIF}
   208 {$ENDIF}
   205 end;
   209 end;
   206 
   210 
   207 function FloatToStr(n: hwFloat): shortstring;
   211 function FloatToStr(n: hwFloat): shortstring;
   208 begin
   212 begin