A label is simply a place in your code that can be jumped to on command, while a subroutine is basically a label that will perform a set of actions and return you to where you were in your code. I will assume you have read our first tutorial or know how to start coding and run your programs. Lets get to it.
- 'Comments can be written starting with ', everything after it is ignored.
- VISABLE 1,0,0,0,0,0:ACLS:CLS 'Multiple commands can be separated with :
- GOTO @OURLABEL
- PRINT "THIS CODE WILL NOT BE EXECUTED"
- @OURLABEL
- PRINT "WE JUST JUMPED TO OUR LABEL!"
- GOSUB @OURSUBROUTINE
- PRINT "THIS CODE WILL BE EXECUTED"
- END
- @OURSUBROUTINE
- PRINT "WE ENTERED THE SUBROUTINE!"
- RETURN
New Commands Used:
GOTO - Forced Branch.
This command jumps to a label and executes the code after it.
- GOTO @label
This command jumps to a label and can be returned back to its original position in code.
- GOSUB @label
This will return you to where you called GOSUB.
- RETURN
This quits out of the program.
- END
A label is simply a place in your code that can be jumped to on command, while a subroutine is basically a label that will perform urdu video tutorial sites
ReplyDeletetutorial or know how to start coding and run your programs. Lets get to it.wordpress tutorial in urdu
ReplyDelete