#### STR

#### Synopsis

    HELP:   String representation of an integer
    TYPE:   OBJECT
    SYNTAX: STR(CHRSET=NONE/SYSTEM/ASCII/UCS1/UTF8/EBCDIC/UCS2BE/UTF16BE/UCS2LE/UTF16LE/UCS4BE/UTF32BE/UCS4LE/UTF32LE/LOCAL,BASE=num/BIN/B02/OCT/B08/DEC/B10/HEX/B16,GROUPSEPARATOR/MARKER=num/NON/OFF/SYSTEM/PERIOD/COMMA/SPACE/APOSTROPHE,VALUE='str')

#### Description

Reads a string representation of an integer number. The result is an FL5-internal neutral integer representation which can be converted to any of the supported target integer representations by a corresponding write converter.

The string can be in decimal (base 10), hexadecimal (base 16), binary (base 2) or octal (base 8) format. The BASE parameter must be set accordingly. The default base is decimal. Decimal numbers may be positive or negative. For all other bases, only positive numbers without a sign character are supported.

The CHRSET parameter must match the character set of the string. If no character set is specified, the system's default character set is assumed. All character sets supported by the character conversion module can be used, including multi-byte charsets.

If the string has some leading or trailing whitespace characters, they are ignored.

The VALUE parameter can be used to specify a default integer value in local character set and decimal base. An empty string will be replaced by the default value and will not result in an error anymore.

#### Arguments

- `NUMBER: CHRSET=NONE/SYSTEM/ASCII/UCS1/UTF8/EBCDIC/UCS2BE/UTF16BE/UCS2LE/UTF16LE/UCS4BE/UTF32BE/UCS4LE/UTF32LE/LOCAL - Character set [SYSTEM]`
  - `NONE - No character set defined`
  - `SYSTEM - SYSTEM (environment specific (on mainframe EBCDIC else ASCII))`
  - `ASCII - ASCII (mainly used in the for open system)`
  - `UCS1 - UCS-1 (for text formatting identical to ASCII < 64k)`
  - `UTF8 - UTF-8 (for text formatting identical to ASCII < 2M)`
  - `EBCDIC - EBCDIC (mainly used on IBM mainframe)`
  - `UCS2BE - UCS-2 Big Endian (multibyte character set < 64k)`
  - `UTF16BE - UTF-16 Big Endian (multibyte character set < 2M)`
  - `UCS2LE - UCS-2 Little Endian (multibyte character set < 64k)`
  - `UTF16LE - UTF-16 Little Endian (multibyte character set < 2M)`
  - `UCS4BE - UCS-4 Big Endian (multibyte character set < 64k)`
  - `UTF32BE - UTF-32 Big Endian (multibyte character set < 2M)`
  - `UCS4LE - UCS-4 Little Endian (multibyte character set < 64k)`
  - `UTF32LE - UTF-32 Little Endian (multibyte character set < 2M)`
  - `LOCAL - LOCAL (platform specific (on mainframe EBCDIC else ASCII))`
- `NUMBER: BASE=num/BIN/B02/OCT/B08/DEC/B10/HEX/B16 - Base / Radix [DECIMAL]`
  - `BIN - Binary base (2)`
  - `B02 - Base 2 (binary)`
  - `OCT - Octal base (8)`
  - `B08 - Base 8 (octal)`
  - `DEC - Decimal base (10)`
  - `B10 - Base 10 (decimal)`
  - `HEX - Hexadecimal base (16)`
  - `B16 - Base 16 (hexadecimal)`
- `NUMBER: GROUPSEPARATOR/MARKER=num/NON/OFF/SYSTEM/PERIOD/COMMA/SPACE/APOSTROPHE - Decimal marker [SYSTEM]`
  - `NON - Decimal marker are not set`
  - `OFF - Decimal marker are not allowed`
  - `SYSTEM - Use locale dependent separator`
  - `PERIOD - Use period (.) as separator`
  - `COMMA - Use comma (,) as separator`
  - `SPACE - Use space ( ) as separator`
  - `APOSTROPHE - Use apostrophe (') as separator`
- `STRING: VALUE='str' - Default value (decimal) used, if string format is empty [ERROR]`