line of code
line of code[′līn əv ′kōd]
A single statement in a programming language.
McGraw-Hill Dictionary of Scientific & Technical Terms, 6E, Copyright © 2003 by The McGraw-Hill Companies, Inc.
lines of codeThe instructions a programmer writes when creating a program. Lines of code are the "source code" of the program, and one line may generate one machine instruction or several depending on the programming language. A line of code in assembly language is typically turned into one machine instruction. In a high-level language such as C++ or Java, one line of code generates a series of assembly language instructions, which results in multiple machine instructions. For coding examples, see source code.
Lines of Code Are Not All the Same
A single line of code may call for the inclusion of a subroutine that can be of any size, so while lines of code are commonly used to measure the overall complexity of a program, the metric is not absolute. Comparisons can also be misleading if the programs are written in different languages. For example, 20 lines of code in Java might easily require 200 lines of code in assembly language.
In addition, measuring lines of code says absolutely nothing about code quality. Five hundred lines written by a seasoned programmer can perform the same processing as two thousand lines of code by another. See assembly language, machine language and compiler.
Copyright © 1981-2019 by The Computer Language Company Inc. All Rights reserved. THIS DEFINITION IS FOR PERSONAL USE ONLY. All other reproduction is strictly prohibited without permission from the publisher.