Classic Computer Magazine Archive COMPUTE! ISSUE 87 / AUGUST 1987 / PAGE 8

Line Lengths In Commodore BASIC

I am planning to buy a 128. I recently typed in a program line for the 128 on my 64 and exceeded the two-line limit. This caused a syntax error when I pressed RETURN. Does this mean I need an 80-column monitor to type in programs for the 128?

John Gacis

The maximum length of a BASIC line has nothing to do with what type of monitor you're using. The controlling factor is the size of the input buffer, where program lines are processed after entry. The 64 has an input buffer of 80 characters, which is why you're limited to no more than two 40-column lines for any BASIC line typed on a 64. The 128 has an input buffer 160 characters long. On a 40-column monitor, a single BASIC program line can span up to four lines. On an 80-column monitor, only two lines are filled, but the line-length limit is the same regardless of the monitor.