GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Download
  • News
  • Community
  • Resources
  • Language Reference
  • SmallBASIC Manual

This view

  • Original page
  • New address

GeezerVison is showing smallbasic.github.io — SmallBASIC | VAL

Edit History

VAL

f = VAL (s)

Home > Reference > String

Returns the numeric value of string s. If s cannot be converted to a number, VAL will return 0. VAL does not evaluate the string.

Example

print val("123")        ' Output: 123
print val("123e2")      ' Output: 12300
print val("0xFF")       ' Output: 255

print val("123*2")      ' Output: 123
print val("123abcd")    ' Output: 0
print val("seven")      ' Output: 0
Code samples using VAL
002 numeric variables.bas   003 conditional branching.bas   2048.bas   3d_palmx.bas   3dtictac.bas   3dttt.bas   3dttt.bas   7gables.bas   Balleta 2-11-15.bas   biorythms.bas   block.bas   bowling7.bas   btn 21.bas   calc.bas   Calendar.bas   calendar.bas   cgi_counter.bas   chart.bas   Charts.bas   checkers.bas   chess.bas   color chart.bas   conrec-sb-v01.bas   coordplot.bas   counter.bas   crgb.bas   demanda.bas   dia de una fecha.bas   driven_mass_and_spring.bas  
String
ASC   BCS   BIN   CBS   CHOP   CHR   DISCLOSE   ENCLOSE   FORMAT   HEX   INSTR   JOIN   LCASE   LEFT   LEFTOF   LEFTOFLAST   LOWER   LTRIM   MID   OCT   REPLACE   RIGHT   RIGHTOF   RIGHTOFLAST   RINSTR   RTRIM   SINPUT   SPACE   SPC   SPLIT   SPRINT   SQUEEZE   STR   STRING   TRANSLATE   TRIM   UCASE   UPPER   VAL  
This page was last edited on Wed, 13 Sep 2023 15:00:24 +0200 | Markdown processed with pandoc 3.1.12.1
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.