Next: 10.5 Axis Words Up: 10. G Code Basics Previous: 10.3 Words Contents Index

# 10.4 Line Number Words

A line number is the letter N followed by an integer (with no sign) between 0 and 99999. Line numbers are not checked except for to many digits. It is not necessary to number lines because they are not used by the interpreter. But they can be convenient when looking over a program. N word line numbers are reported in error messages when errors are caused by program problems.

Line numbers can be confusing because they are not the number that is displayed as being executed. Nor are they the number used to restart an nc program at a line other than the start. That number is the number of the current block in the program file with 0 being the first block.

Even though the N word limit is 99999, the program is not limited by this constraint. As mentioned earlier, the interpreter does not need line numbers, therefor, if they are omitted, the maximum number of lines is only limited by the underlying operating system. Running under Linux, this is 2^31, or 2,147,483,648 lines - You would probably find you run out of memory before this limit is reached.

Next: 10.5 Axis Words Up: 10. G Code Basics Previous: 10.3 Words Contents Index