Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- QuickBASIC 3.0 - <b>val numeric value of a string</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
VAL                      Numeric Value of a String

 y = VAL(stringexpr)

    Returns the numeric value represented by a string expression.

  stringexpr    A string expression.

   ----------------------------------------------------------------------

      Notes:    VAL attempts to extract a number from the first characters
                of its argument. In doing so, it ignores leading blanks,
                tabs, and line feeds, and treats a single hyphen as
                signifying negation. For example, VAL("   -32 Main
                Street") returns -32.

                If the first character in the argument (or the first
                character following all space and tab characters) is a
                letter, VAL returns 0. Thus, for example, VAL("Yomama")
                returns 0.

See Also: ASC STR$

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson