SecondBASIC Documentation v3

Home / Function Reference / Val()

Val()

Description: Converts a string number into a long or integer number.

Syntax:

Val(<expression>)

Part Description
<expression> Required. The string expression to convert to an integer or long.

Example:

        a$ = "580"
        b = Val(a$) + 2
        Print b