Statements

 


Category Actions Statements

Arrays Declare and initialize Dim, ReDim, Static
  Reinitialize Erase, ReDim

Controlling program flow

Branch

GoSub...Return, GoTo, On Error, On...GoSub, On...GoTo
  Exit or pause the program End, Stop, Wait, Pause
  Loop Do...Loop, For...Next, While...Wend
  Make decision If...Then...Else, Select Case
  Preprocessor directives

#If...#Else...#Endif


Date/time Set date or time Date=, Time=

Error trapping Simulate run-time errors Error
  Trap errors while a program is running On Error, Resume

File I/O

Access or create a file

Open
  Close files Close, Reset
  Control output appearance Width #
  Copy one file to another FileCopy
  Manage disk drives or directories ChDir, ChDrive, MkDir, RmDir
  Manage files Kill, Name
  Read from file Get, Input, Line Input
  Set file attributes SetAttr
  Set read-write position in a file Seek
  Write to a file Print, Put, Write #

Math Generate random numbers Randomize

Procedures

Call a procedure

Call
  Declare a reference to an external procedure Declare
  Define a procedure Function...End Function, Sub...End Sub
  Exit from a procedure Exit Function, Exit Sub

Strings Justify a string LSet, RSet
  Manipulate strings Mid

Variables and constants Declare variables or constants Const, Dim, Static
  Assign value Let, Set

Miscellaneous Sound a beep Beep
  Tracing Trace

Index Alphabetical list of statements