Hello, SMALL BASIC Programmer, in this tutorial, I will share about how to debug SMALL Basic code:
You know there are no step up or step down debugging feature in SMALL BASIC editor. So, you basically need traditional way to do code debugging:
If I can define, the types of error are userinput error, and program error.
Userinput error
User input error are program hang or program error or program halt or program crash or program that because generated by wrong or invalid user input.
For example, this is when I asked user what is the fontsize and then the user just press enter without entering value.
For example code are below:
textwindow.writeline("What is the fontsize? :")
fs = textwindow.read()
The rest of the code; the codes after this is just postponed, because of this error.
The solution to this is: Just use if to make sure
2) Example:
textwindow.writeline("What is the divisor? :")
divisor = textwindow.
graphicswindow.fontsize =
There are two errors:
1. Run time error
2.
1. Using GOTO and GOTO label
2. Using textwindow.writeline()
3. Using smallbasic
You know there are no step up or step down debugging feature in SMALL BASIC editor. So, you basically need traditional way to do code debugging:
If I can define, the types of error are userinput error, and program error.
Userinput error
User input error are program hang or program error or program halt or program crash or program that because generated by wrong or invalid user input.
For example, this is when I asked user what is the fontsize and then the user just press enter without entering value.
For example code are below:
textwindow.writeline("What is the fontsize? :")
fs = textwindow.read()
The rest of the code; the codes after this is just postponed, because of this error.
The solution to this is: Just use if to make sure
2) Example:
textwindow.writeline("What is the divisor? :")
divisor = textwindow.
graphicswindow.fontsize =
There are two errors:
1. Run time error
2.
1. Using GOTO and GOTO label
2. Using textwindow.writeline()
3. Using smallbasic
Tidak ada komentar:
Posting Komentar