Alternatively known as a do-nothing instruction, the no-operation instruction, NO-OP or NOP instruction in programming tells a program to do nothing if a conditional statement is met.
Examples of an NOP in different programing languages
- In C a semicolon ( ; ) by itself or an empty block ( {} ) is an NOP.
- With jQuery the “jQuery.noop()” function creates an NOP.
- In Perl the ellipsis statement ( … ) can be used in as an NOP. However, if Perl tries executing the code it gives an Unimplemented exception.
- In Python the “pass” statement can be used as an NOP.
- With Visual Basic a semicolon ( ; ) is an NOP.
Computer abbreviations, Programming terms
This term is pronounced as no op.