Before doing any Pascal programming in GS/OS, you'll need to make sure you have a few things first.
* A IIgs to program on. This can be a real IIgs or a virtual one. My IIgs has 1.25 MB of RAM, and
that is usually enough, but there are times when I find myself wanting more. Especially when working on
large projects, the more memory, the better!
* Pascal software. My preferred software is Complete Pascal, because it is freely available. You
can download it from the
Asimov software archive. Another good choice is ORCA/Pascal, which can be bought from
the Syndicomm store. I don't have a copy of ORCA/Pascal, so I will be
using Complete Pascal code in my examples. It should be mostly the same, however.
After installing Complete Pascal, extract the .SHK someplace convenient and launch the executable.
Select File -> New and create a file somewhere convenient. I named mine HelloWorld.pas.
Now enter the following code into your new file:
PROGRAM HelloWorld; VAR name : String; BEGIN Graphics(640); WriteLn('What is your name?'); ReadLn(Input, name); WriteLn('Hello,', name, '!'); ReadLn; END.Select Compile -> To Memory to run your program. You could also choose Compile -> To Disk to create a application file that can be run on any IIgs. The program should ask you to type your name, then repeat it back to you after you press enter. Pressing enter again will return you to Complete Pascal.