[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Please help me build an Apple IIGS for my son



This is the demonstration of the simplicity of TML Pascal II (I have
since switch to Complete Pascal II - but things still work). My 8 year
old son can understand this program. I personally think this is
clearer than the Applesoft Basic code, but work for Super Hires. Hope
this help for any to-be GS programmer which thinks programming for GS
is too hard. I just do a simple painting program (which I will also be
glad to put the source up if interested) in just one night, which
teaches more advance concept (procedures, arrays, etc).

--
{ Graphics Demo - By Lim Thye Chean }

program Demo;

uses Types, QuickDraw, Events;
var
	i, col: Integer;

begin
	graphics(320);
	hideCursor;

	while true do begin
		clearScreen(black);

		for col := 1 to 15 do begin
			setSolidPenPat(col);

			for i := 0 to 31 do begin
				moveTo(random mod 320, random mod 200);
				line(0, 0);

				moveTo(i * 10, 0);
				lineTo(0, 200 - i * 7);
				moveTo(320 - i * 10, 199);
				lineTo(319, i * 7);
			end;

			if button(0) then halt;
		end;
	end;
end.