No-operation instruction

Updated: 11/13/2018 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.

Tip: This term is pronounced as no op.

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