Board index » delphi » Switching from Turing to Pascal

Switching from Turing to Pascal

1) Should I bother?
2) Where can I get a cheap (read free) Pascal compiler for Mac?
3) Are there any significant differences I will have to watch out for?
From the code I've seen in here it looks like Pascal lacks <end if> and
<end for> statements; is this the case?

Please reply personally to
Karl Knechtel {:-#>
da728 at torfree dot net
replacing " at " with @ and " dot " with . as might be expected.

 

Re:Switching from Turing to Pascal


In article <FACLyx.DID.0.qu...@torfree.net>, da...@torfree.net (Karl

Quote
Knechtel) wrote:
> 1) Should I bother?
> 2) Where can I get a cheap (read free) Pascal compiler for Mac?
> 3) Are there any significant differences I will have to watch out for?
> From the code I've seen in here it looks like Pascal lacks <end if> and
> <end for> statements; is this the case?

> Please reply personally to
> Karl Knechtel {:-#>
> da728 at torfree dot net
> replacing " at " with @ and " dot " with . as might be expected.

1. pass
2. Think Pascal is available for
free...ftp://ftp.symantec.com/public/english_us_canada/products/think_pascal...
3. I am not familiar with Turing but in Pascal you don't use "end if"; you
use "end"

Doug

Re:Switching from Turing to Pascal


Quote
Karl Knechtel wrote:

> 1) Should I bother?

I'm not sure what Turing is, so I can't answer this question. However, I
can tell you that Pascal is quite easy to learn if you know the main
concepts of programming languages. Pascal may not be popular, but it is
still a good language. The decision is totally yours.

Quote
> [snip question 2]
> 3) Are there any significant differences I will have to watch out for?
> From the code I've seen in here it looks like Pascal lacks <end if> and
> <end for> statements; is this the case?

Well, in an If block with less than one statement, there is not need for
an End.
For example:

If condition Then
        do some things here;

An If block with more than one statement does require begin and ends as
seen below:

If condition Then
        Begin
                do some things here;
                do more things here;
        End;

This concept is the same with For loops.
One:
For Count := 1 To 10 Do
        do stuff here;
Two or More:
For Count := 1 To 10 Do
        Begin
                do stuff here;
                do more stuff here;
        End;

Quote
> [snip reply by email request]

--
Ken Robbins
puyrebel <AT> prodigy <DOT> net

"If everything seems to be going well, you have obviously overlooked
something."
-- Murphy's Eighth Law

Re:Switching from Turing to Pascal


In article <FACLyx.DID.0.qu...@torfree.net>,
Quote
Karl Knechtel <da...@torfree.net> wrote:

:Please reply personally to

Please reply to the Usenet news since others might be interested in
the responses as well. (If you feel extra generous, then make an
email copy to Karl.)

   All the best, Timo

....................................................................
Prof. Timo Salmi   Co-moderator of news:comp.archives.msdos.announce
Moderating at ftp:// & http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance  ; University of Vaasa
mailto:t...@uwasa.fi <http://www.uwasa.fi/~ts/>  ; FIN-65101,  Finland

Spam foiling in effect.  My email filter autoresponder will return a
required email password to users not yet in the privileges database.
Advice on spam foiling at http://www.uwasa.fi/~ts/info/spamfoil.html

Re:Switching from Turing to Pascal


In article <FACLyx.DID.0.qu...@torfree.net>

Quote
da...@torfree.net (Karl Knechtel) wrote:
> 1) Should I bother?

I assume turing is a language. Depends. Its better than switching
to C :)

Quote
> 2) Where can I get a cheap (read free) Pascal compiler for Mac?

Theoretically GPC should be Macable. It would require some skill on
your part, however.

Quote
> 3) Are there any significant differences I will have to watch out for?
> From the code I've seen in here it looks like Pascal lacks <end if> and
> <end for> statements; is this the case?

You betcha. In the book "Oberon, the language", Wirth (the creator of
Pascal) said that the omission of the specific end statements for for, while
and if statements was a major flaw in Pascal's design, which was done
at the time to please Algol programmers (which I presume worked the
same way). And all his later languages included that feature.

Note that you can get the exact same effect by using begin-end braketing:

for ... do begin .. end;
while ... do begin ... end;
if ... then begin ... end;

Me, I use while and for for small tasks un{*word*62}erated, braket for anything
significant, and usually braket if/then/else for any complex ifs whatever.
I got very tired of dealing with dangling else's.

Quote

> Please reply personally to
> Karl Knechtel {:-#>
> da728 at torfree dot net
> replacing " at " with @ and " dot " with . as might be expected.

No, and increasingly it is considered rude to ask, sorry.

                                    [sam]

The year 2000. The stock market hitting 10,000.
These events prove once and for all that we
have ten fingers......

Other Threads