EBSILON®Professional Online Documentation
EbsScript / EbsScript Functions / Type Conversion Functions
In This Topic
    Type Conversion Functions
    In This Topic

    Type Conversion Functions


    These functions are used for the type conversions of the variables.

    Name

    Purpose

    Type of arguments

    Return value

    Example

    boolean

    Converts the argument in a boolean value

     

    INTEGER
    REAL
    CHAR
    STRING
    EBSVAR

    BOOLEAN:

    false, if 0, else true
    false, if 0.0, else true
    false, if ‘\0’, else true
    false, if leer, else true
    , if EBSVAR valid, not blank and not  0, else false

    b:=boolean(1);

    char

    Converts the argument in a character

     

    INTEGER
    REAL
    BOOLEAN
    STRING

    EBSVAR

    CHAR:

    character according to the ASCII Table
    character according to the ASCII Table
    ‘\0’ if false, ‘\1’ if true
    0, if blank, else first character of the string
    ASCII character according to the value of EBSVAR

    c:=char(65);

    integer

    Converts the argument in an integer value

     

    BOOLEAN
    REAL
    CHAR
    STRING
    EBSVAR

    INTEGER:

    0 if false, 1 if true
    Integer part of the real value
    ASCII Index of the character
    number as a string
    Integer value of the EBSVAR

    i:=integer(12.3);

    real

    Converts the argument in a real number

     

    BOOLEAN
    INTEGER
    CHAR
    STRING
    EBSVAR

    REAL:

    0.0 if false, 1.0 if true
    Value as real number
    ASCII Index of the character (as real)
    Value as a string
    real number of the EBSVAR

    r:=real(“47.12”);

    string

    Converts the argument in a text

     

    BOOLEAN
    INTEGER
    REAL
    CHAR
    EBSVAR

    STRING:

    “false” / “true” as string
    Integer value as string
    real number as string
    with the specified characters
    Value of the EBSVAR as a string

    s:=string(47.12);

    Data types pointing to the objects in the Ebsilon model are described in the chapter Data types.