BEGIN
	CLASS FmtLines;
		HIDDEN ch, main;					! private members;
	BEGIN
		CHARACTER ch;						! communication;

		PROCEDURE main;						! mimic uC++ coroutine main;
		BEGIN
			INTEGER g, b;

			WHILE TRUE DO BEGIN				! for as many characters;
				FOR g := 1 STEP 1 UNTIL 5 DO BEGIN		! groups of 5;
					FOR b := 1 STEP 1 UNTIL 4 DO BEGIN	! blocks of 4;
						OutChar( ch );
						Detach;				! suspend();
					END;
					OutText( "  " );
				END;
				OutImage;					! start newline;
			END;
		END;

		PROCEDURE prt( chp );
			CHARACTER chp;
		BEGIN
			ch := chp;						! communication;
			Call( THIS FmtLines );			! resume();
		END;
		! FmtLines constructor code;
		Detach;								! return to declaration;
		main;								! call main as last line of constructor;
	END FmtLines;
	! program main equivalent;
	REF(FmtLines) fmt;						! objects are references;
	INTEGER i;

	fmt :- NEW FmtLines;
	FOR i := Rank( ' ' ) STEP 1 UNTIL Rank( 'z' ) DO BEGIN
		fmt.prt( Char( i ) );
	END
END;

! Local Variables: ;
! tab-width: 4 ;
! compile-command: "cim Format.sim" ;
! End: ;
