NO-OPeration instruction

Updated: 04/26/2017 by Computer Hope

Alternatively referred to 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 a NOP in different programing languages

  • In C a semicolon ( ; ) by itself or an empty block ( {} ) is a NOP.
  • With jQuery the "jQuery.noop()" function creates a NOP.
  • In Perl the ellipsis statement ( … ) can be used in as a NOP. However, if Perl tries executing the code it gives an Unimplemented exception.
  • In Python the "pass" statement can be used as a NOP.
  • With Visual Basic a semicolon ( ; ) is a NOP.

Programming terms