en:try [BASIC 256 - Language Documentation]

# BASIC 256 - Language Documentation

en:try

## Try / Catch / EndTry (Statement)

### Format

try
statement(s)
catch
statement(s)
end try

### Description

Execute the statement(s) inside the try. If a runtime error occurs jump to the code in the catch.

### Example

    for t = -1 to 1
       try
          print "9/"+t + "= " + (9/t)
       catch
          print "division by zero"
       end try
    next t

will display

    9/-1= -9
    division by zero
    9/1= 9

### See Also

Lasterror, Lasterrorextra, Lasterrorline, Lasterrormessage, Offerror, Onerror, ThrowError, Try / Catch / EndTry

### History

1.0.0.2 | New To Version

en/try.txt · Last modified: 2014/02/09 20:25 by admin