Back to index
1. You cannot use a GoTo to branch from outside procudure or function
Sub GotoStatementDemo() Number = 1 ' Initialize variable. If Number = 1 Then GoTo Line1 Else GoTo Line2 end if Line1: MyString = "Number equals 1" GoTo LastLine ' Go to LastLine. Line2: ' The following statement never gets executed because Number = 1. MyString = "Number equals 2" LastLine: ' Print "Number equals 1" in the Output window. Print MyString End Sub
Copyright (c) 2000-2005 by SymbianWare OHG. All rights reserved.
SymbianWare and SymbianWare logo are trademarks of SymbianWare OHG.