An instruction that exists in REXX and most (all?) assembler variants is NOP. This is short for No Operation, and it does nothing.
So, what is the use?
Well, it's a way for me as developer to explicitly tell that I don't want to do anything, as opposed to "Oops, he forgot something".
Example:
In the above example, I could have used a comment to say "Not a problem, ignore it", but that would have given compiler warnings about an empty catch.
Another example:
In this example, I explicitly show that nothing is to be done on weekends, so that the next guy who comes along don't look at the code and thinks "Hmm, he's missed a couple of days, I'll better fix it...".
So, what is the use?
Well, it's a way for me as developer to explicitly tell that I don't want to do anything, as opposed to "Oops, he forgot something".
Example:
B4X:
Try
'Code which may fail, but I know why it fails and it can safely be ignored
Catch
NOP
End Try
In the above example, I could have used a comment to say "Not a problem, ignore it", but that would have given compiler warnings about an empty catch.
Another example:
B4X:
Select weekday
Case "Monday"
DoMeetings
Case "Tuesday"
DoWork
Case "Wednesday"
DoMeetings
Case "Thursday"
DoDrinkCoffey
Case "Friday"
DoWatchClock
Case "Saturday"
NOP
Case "Sunday"
NOP
End Select
In this example, I explicitly show that nothing is to be done on weekends, so that the next guy who comes along don't look at the code and thinks "Hmm, he's missed a couple of days, I'll better fix it...".