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

Re: GSoft BASIC Ramble



On Jun 7, 2:05 am, limtc <thyech...@gmail.com> wrote:
> Hi Mike,
>
> As I am thinking of teaching Ding Wen Object Oriented Programming and
> found that Orca/Pascal II has the Object Pascal extension, so I am now
> reading up on Orca/Pascal II.
>
> Any particular Complete Pascal extension that it has that Orca/Pascal
> II don't have? At least from what I have read, StartGraphics(320)
> seems to be the same as Graphics(320), and it even has a StartDesk
> which I am tempting to try out.
>
> On 6月6日, 下午9时46分, Polymorph <polymorp...@hotmail.com> wrote:
>
> > Mike,
>
> > You are dead right. Although I *gasp* prefer Complete Pascal over Orca/
> > Pascal (I prefer Complete Pascals extensions), your "Learn to Program
> > in Pascal" and "Toolbox Programming in Pascal" are both excellent
> > resources for someone starting out. Although I'd already nutted much
> > of the Toolbox out prior to purchasing Opus ][, I still reckon you
> > need to be commended for writing such excellent resources! They are
> > definitely top-shelf if you want a "learn-at-your-own-pace" type
> > tutorial/reference that is tailored to a specific compiler/language.
>
> > Cheers,
> > Mike

There are a number of subtle differences between Complete Pascal and
Orca/Pascal (some of which I can't remember of the top of my head),
but the extensions I prefer in Complete Pascal over Orca/Pascal are
the "leave" and "exit" statements - remember "leave" exits from a
loop, and "exit" returns from a procedure/function. Now these are
minor annoyances and can be "simulated" via the use of labels and GOTO
statements, but I prefer the CP way. You can also use labels and GOTO
statements in CP too, but its nice to have them built into the
language. Being a "modern-day" programmer, I find GOTO statements in
high level languages particularly ugly. The beauty of "leave" and
"quit" statements is that they are predefined and the result is
deterministic - if you happen to place a label incorrectly in your
code, then the result of your code becomes undeterministic and it may
be hard to track such bugs down.

I know a lot of old timers like GOTO statements even in high-level
languages and I've heard all the merits before, but I still reckon
they're a poor substitute for a well implemented language construct
(for example a "leave" or "exit" statement). That's my opinion anyhow.

Having said all that, Orca/Pascal is still a fine language, and I am
using it at present. I just found after cutting my teeth with Complete
Pascal, I was missing these little features. The absence of these
features also made translating my CP code into Orca/Pascal code a
bigger job than I had originally thought.

I have also just moved onto Orca/C which suits me better as this is my
preferred language. The Opus ][ CD is definitely excellent value and I
would recommend it for anyone contemplating programming for the IIgs.

Cheers,
Mike