If ExprN //Case_1 condition here //Do stuff ...
Scan QR Code JIS X 0510 In NoneUsing Barcode Control SDK for Software Control to generate, create, read, scan barcode image in Software applications.
Encode QR Code In NoneUsing Barcode generator for Software Control to generate, create QR image in Software applications.
COMMANDS, FUNCTIONS, AND OTHER DETAILS
Reading QR Code ISO/IEC18004 In NoneUsing Barcode decoder for Software Control to read, scan read, scan image in Software applications.
Painting Denso QR Bar Code In Visual C#.NETUsing Barcode encoder for Visual Studio .NET Control to generate, create QR-Code image in .NET applications.
ElseIf ExprN //Case_2 condition here //Do stuff ... ElseIf ExprN //Case_3 condition here //Do stuff ... . . . Else //Do Stuff that will be done if no case is true ... Endif
Generating Quick Response Code In .NET FrameworkUsing Barcode printer for ASP.NET Control to generate, create QR Code JIS X 0510 image in ASP.NET applications.
QR Code Creation In Visual Studio .NETUsing Barcode maker for Visual Studio .NET Control to generate, create QR Code image in .NET applications.
C.6.9 GoSub STATEMENT
Generating QR Code JIS X 0510 In Visual Basic .NETUsing Barcode maker for .NET Control to generate, create QR Code JIS X 0510 image in .NET applications.
Data Matrix Maker In NoneUsing Barcode maker for Software Control to generate, create Data Matrix image in Software applications.
Gosub Label Gosub Expr Return
Creating Barcode In NoneUsing Barcode creation for Software Control to generate, create barcode image in Software applications.
Printing USS-128 In NoneUsing Barcode printer for Software Control to generate, create EAN 128 image in Software applications.
Flow will go to the statement immediately following the Label and will continue until a Return statement is encountered after which the ow will return to the line following the line that called the subroutine. A subroutine is marked by a Label and the Return statement as the last line. You can use other Return statements within the logic of the subroutine, but always have the last line of the subroutine as a Return, just in case your logic gets there. If you do not do so any program lines following the subroutine will be executed as part of the subroutine. You can call a subroutine from within another subroutine. An error will be issued if you try to nest too deep. Be careful when you do this that you do not inadvertently create a circular endless loop. Recursion can also cause trouble if you do not have the correct windup conditions. If you use the format Gosub Expr, then Expr must result in a number or string that is a name of a valid label. If Expr results in a number then it will be converted to a string. So saying Gosub 1000, Gosub 100*10, or Gosub 1000 are all equivalent and would cause the program ow to branch to the label 1000. The second format is useful if you want to branch to a subroutine name that will be calculated depending on some logic. For example, you may have an array of labels and you can make the program go to one of the labels depending on some number that is used to index in the array. Example:
Generating Code 128 Code Set A In NoneUsing Barcode generation for Software Control to generate, create Code 128 Code Set A image in Software applications.
GS1 - 13 Creator In NoneUsing Barcode creator for Software Control to generate, create European Article Number 13 image in Software applications.
Data Labels; L1 ,100, 1000 while true Input Enter a number 0 to 2 ,I If !Within(I,0,2) then continue Gosub Labels[I] wend End L1: print I am In L1 Gosub Substring( I m going to Test_Sub, Bye ,14,8) //notice the above line calculates the subroutine
Painting ANSI/AIM Code 93 In NoneUsing Barcode generator for Software Control to generate, create USS 93 image in Software applications.
Generating Code 39 Full ASCII In JavaUsing Barcode creation for Android Control to generate, create Code 39 Full ASCII image in Android applications.
APPENDICES
Generate Data Matrix ECC200 In NoneUsing Barcode creator for Font Control to generate, create Data Matrix 2d barcode image in Font applications.
Painting Barcode In JavaUsing Barcode creation for Java Control to generate, create barcode image in Java applications.
//name using functions Return 100 print I am In 100 Gosub Labels[I]*10 //notice the above line how it goes to a subroutine // name that is mathematically calculated Return 1000 print I am In 1000 a = Test + _Sub Gosub a //notice above goes to a subroutine name de ned //by a variable Return Test_Sub: print I am in Test_Sub Return
Making GS1 - 13 In JavaUsing Barcode generator for Java Control to generate, create GS1 - 13 image in Java applications.
Making UCC - 12 In NoneUsing Barcode drawer for Word Control to generate, create UCC - 12 image in Office Word applications.
NOTE: Return statements within if-structures inside subroutines must be carefully considered; be extra careful when using Return statements out of subroutines within if-structures. Check your logic.
Making Code-39 In .NETUsing Barcode drawer for ASP.NET Control to generate, create Code 39 Full ASCII image in ASP.NET applications.
Decoding ECC200 In Visual C#.NETUsing Barcode reader for .NET Control to read, scan read, scan image in VS .NET applications.
C.6.10 OnErroR STATEMENT
OnError Label OnError Expr OnError
This is a special format of a GoSub. If an error occurs during the run of a program the system will direct the ow to the subroutine de ned by Label or the label de ned in the variable Expr (just as in the GoSub statement above). No error message will be issued and the program will continue to run as if you have just issued a GoSub statement on the line that caused the error. In the subroutine you can use the command GetError VarN1{,VarS{,VarN2{,VarN3}}} to nd out the error number, message, line number, and character number. It is up to you to handle the error and how to redirect the program ow accordingly. You can issue this statement with different labels at different times to override the routine that will be used if an error occurs. You can also issue the statement without a label (or Expr) to turn off the feature and have the interpreter handle errors as normal C.6.11 End COMMAND Will cause the program ow to terminate and return to the editor. The Terminal Screen will remain on top but you can close it or use the button on the bottom right corner to switch to the editor window. Or use Windows methods to do so. You can review the terminal screen if you close it, by using the menu or speed button on the editor window. C.6.12 Goto STATEMENT