codefragment
nounUK /ˈkəʊd ˈfræɡmənt/
US /ˈkoʊd ˈfræɡmənt/
A codefragment is a small piece of computer code.
The teacher showed us a codefragment that makes a button change color.
OTHER MEANINGS
2. A short section of a program that can be reused in other programs.
She saved the codefragment in a library so her team could use it later.
3. A broken or incomplete part of a computer program.
The error happened because a codefragment was missing a closing bracket.
4. A small text sample used to explain how programming works.
The tutorial began with a simple codefragment that prints 'Hello, world!'