Unit 'amigados' Package
[Overview][Constants][Types][Procedures and functions][Index] [#amunits]

StrToLong

string to Integer value (decimal)

Declaration

Source position: amigados.pas line 1727

function StrToLong(

  const string_: pCHAR;

  var value: LongInt

):LongInt;

function StrToLong(

  const string_: string;

  var value: LongInt

):LongInt;

Arguments

string_

  

Input string.

value

  

Pointer to integer value. Set to 0 if no digits are converted.

Function result

Number of characters converted or -1.

Arguments

string_

  

Input string.

value

  

Pointer to integer value. Set to 0 if no digits are converted.

Description

Converts decimal string into Integer value. Returns number of characters converted. Skips over leading spaces and tabs (included in count). If no decimal digits are found (after skipping leading spaces and tabs), StrToLong() returns -1 for characters converted, and puts 0 into value.


Documentation generated on: 2021-07-30