Commodore 128 Alive!

Commodore 128 => Tips & tricks => Topic started by: Blacklord on December 29, 2007, 10:52 AM

Title: Indented listings
Post by: Blacklord on December 29, 2007, 10:52 AM
You can indent program listings by adding any graphics character after the line number & then add as many spaces before the start of the code as you need.
Title: Indented listings
Post by: BigDumbDinosaur on January 02, 2008, 04:30 AM
Quote from: adminYou can indent program listings by adding any graphics character after the line number & then add as many spaces before the start of the code as you need.
A similar effect can be obtained by beginning each line of code with a colon.  For example:
1000 for i = 1 to 100
1010 :   print i
1020 next i

The interpreter will skip over the colon with minimal effect on execution speed.  Any amount of space may be inserted between the first colon and the rest of the line.

:-)
Title: Re: Indented listings
Post by: Pinacolada on October 25, 2009, 04:43 AM
A Jim-Butterfield-ism, start the line like so:

10 {SHIFT-space} {space} {SHIFT-space} <any number of leading blanks> <statement(s)>

Tada! Invisible leader. Takes up a bit more space (ha!), but is nifty, I think.
EhPortal 1.34 © 2026, WebDev