The character ruler

BASin

The character ruler

The character ruler is located at the bottom of the editor. It helps making long strings for display on-screen. Due to how the PRINT codeword works, a string longer than 32 characters will "wrap" round to the beginning of the next line down. This can be useful for displaying many lines of text on one command. The character ruler will show you at a glance how long your string is, and a red marker will appear at any point where the 32 character boundary is reached. This happen whenever the cursor enters a quote delimited string area in the BASIC text.

character ruler

To show or hide the character ruler, choose Character Ruler on the View menu.

Edit cursor position

Each mark on the ruler represents one character. Every eighth mark has a number that indicates the character count from the start of the program line. These numbers increase as you scroll to the right.

The small black arrow ( ) shows the location of the edit cursor.

A grey vertical bar shows the position of the mouse pointer.

String lengths

The character ruler also indicates the lengths of strings. (A string is a piece of program text enclosed in quotation marks, such as "Welcome".)

While the edit cursor is inside a string, the character ruler displays the length with a green bar, with a red arrow after every 32nd character. The Spectrum screen display is 32 characters wide, so this shows where a line of text will wrap.

character ruler displaying the length of a string

See also the section on the editor context menu for information on wrapping long strings around the screen with word-wrap and other effects.