Article View: comp.sys.atari.st
Article #27091Spring STart (MACROPIX Flame)
From: K538915
Date: Wed, 03 Jun 1987 01:57
Date: Wed, 03 Jun 1987 01:57
63 lines
2860 bytes
2860 bytes
After getting the spring issue of STart (at last, we get it a bit
late here :-)), the first program I looked at was MACROPIX
(being the Pascal-Fan I am) and after looking at the source I have
serious doubts if the editors of STart have ever seen a line
of decent Pascal source before!
This is NOT a flame of the person who wrote MACROPIX, but of
the people who managed to publish a program that doesn't have a
single Begin..End block (with the exception of procedure bodies
naturally) in it! Without even trying hard, (30 min. work)
I reduced the source size from 63118 bytes to 52759 bytes and the
size of the executable from 66706 bytes to 57875 bytes and I didn't
even touch the data structures in the program! I estimate that
there is potential for saving another 10 kB in the executable,
just by using better data structures.
The whole purpose of publishing the source of a program like
MACROPIX is that the readers of STart learn something about
programming style and techniques, but MACROPIX as published is
an example of how NOT to program in Pascal (I find this particulary
annoying in a magzine which has a nasty remark about Pascal by
Dave Small in every issue (I liked the one which went something
like: 'Pascal compilers are notorious for generating inefficent code',
I could just as well claim 'C compilers are notorious for generating
buggy code' which is much easier to prove, just read this news-group
for a week!)).
I'm sure the author of MACROPIX could have produced a much improved
version of the program if somebody at STart would have looked at
it and made a few suggestions about what to improve.
Simon Poole
K538915@CZHRZU1A.BITNET
PS: And what about formating Pascal programs in a readable way?
I normally do it like this:
{Idiotic program}
Program SillyProgram;
Var i : Integer;
{Write 'Silly1'}
Procedure Silly1;
Begin
WriteLn('Silly1')
End;
{Write 'Silly2'}
Procedure Silly2;
Begin
WriteLn('Silly2')
End;
Begin {Main}
For i := 1 To 100 Do Begin
Silly1;
Silly2
End {For}
End.
Technical Details
Message-ID:
<8706030013.AA09943@ucbvax.Berkeley.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!cbosgd!ucbvax!CZHRZU1A.BITNET!K538915Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!cbosgd!ucbvax!CZHRZU1A.BITNET!K538915 From: K538915@CZHRZU1A.BITNET.UUCP Newsgroups: comp.sys.atari.st Subject: Spring STart (MACROPIX Flame) Message-ID: <8706030013.AA09943@ucbvax.Berkeley.EDU> Date: Tue, 2-Jun-87 21:57:38 EDT Article-I.D.: ucbvax.8706030013.AA09943 Posted: Tue Jun 2 21:57:38 1987 Date-Received: Fri, 5-Jun-87 01:32:11 EDT Sender: usenet@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 63