equal
deleted
inserted
replaced
334 |
334 |
335 // Convert string to longint, with error checking. |
335 // Convert string to longint, with error checking. |
336 // Success will be set to false when conversion failed. |
336 // Success will be set to false when conversion failed. |
337 // See documentation on Val procedure for syntax of s |
337 // See documentation on Val procedure for syntax of s |
338 function StrToInt(s: shortstring; var success: boolean): LongInt; |
338 function StrToInt(s: shortstring; var success: boolean): LongInt; |
339 var Code: Word; |
339 begin |
340 begin |
340 val(s, StrToInt); |
341 val(s, StrToInt, Code); |
341 success:= StrToInt <> nil; |
342 success:= Code = 0; |
|
343 end; |
342 end; |
344 |
343 |
345 // Convert string to longint, without error checking |
344 // Convert string to longint, without error checking |
346 function StrToInt(s: shortstring): LongInt; |
345 function StrToInt(s: shortstring): LongInt; |
347 var success: boolean; // ignored |
346 var success: boolean; // ignored |