Navigation:  thinBasic language > Script structure > Execution directives > #DEFAULT >

BOUNDCHECK

Previous pageReturn to chapter overviewNext page

 

Description

 

This execution directive switch ON or OFF array bound checking.

Default behaviour is ON.

 

Syntax

 

#DEFAULT BOUNDCHECK [ON | OFF]

 

Returns

 

None

 

Parameters

 

Remarks

 

Attention: turning OFF array bound checking can generate unpredictable results and even a general protection fault operating system error.

 

Restrictions

 

See also

 

Examples

 

#DEFAULT BOUNDCHECK OFF

 

DIM MyVar(100) As Long

 

MyVar(101) = 12345      '---In this case no runtime error will be generated

                        '---even if 101 is outside MyVar bound