********************** WE MOVED *********************
The standard Pascal web site now has its' own
separate domain:
********************** WE MOVED *********************
The Standard Pascal web site is the only place you will find all of the
original papers on Pascal, original programs, and original history
collected in one place.
Because the Standard Pascal web site includes important, one of a kind
historical items concerning the language Pascal, it is my intent to
arrange for it to appear even if I can no longer maintain it.
*****************************************************
The Standard Pascal web site has been extensively updated. It has the
following new items:
* The ISO 7185 Pascal FAQ was extensively changed, including:
- Larger book section.
- Comparision between ISO 7185 language and Delphi was reworked using
tests run on both types of compilers.
- New string handling library using only standard Pascal.
- Boolean math examples were improved and corrected.
- New section on parsing input without errors.
* A new ISO 7185 compliance report was performed for GNU Pascal.
This site is the only web site specifically devoted to the J&W and ISO
7185 versions of the Pascal language (the original Pascal language).
The features you will find on the site are:
* A list of available ISO 7185 Pascal implementations available for your
use.
* The ISO 7185 Pascal FAQ, including
+ What is ISO 7185 Pascal ?
+ The history of Pascal.
+ Status of standards.
+ Difference between several nonstandard implementations such
as Borland, Delphi, and Apple with the standard.
+ What subset of Pascal is acceptable to ALL implementations,
even non-standard ones.
+ Can standard Pascal be crashed ?
+ How to perform strings in standard Pascal.
+ How to perform a "type cast" in standard Pascal (yes, really).
+ What is the extended Pascal standard.
* A complete overview of the rules and working of ISO 7185 Pascal.
* History and BIO on Niklaus Wirth, Pascal's originator.
* The complete standards documents, including the ISO 7185 standard.
* A collection of ISO 7185 Pascal compatible programs, including:
+ Pascal-s, a compiler/interpreter for a Pascal subset.
+ P4 compiler/interpreter, the same one UCSD was based on.
+ Pretty printer.
+ Basic-s, a tiny basic intepreter.
* The Yacc and Flex parsing grammar for ISO 7185 (for people building
Pascal compilers as a student project).
* Information on the original CDC 6400 working basis of Pascal.
* The complete scans of the original PUG or Pascal Users' Group
newsletters. This includes a huge amount of the original history of
Pascal.
From
> - Comparision between ISO 7185 language and Delphi was reworked using
> tests run on both types of compilers.
point 7:
"
7. It is not possible to construct a standard program without compiler
directives. At minimum:
{$APPTYPE CONSOLE}
is required"
This is incorrect, use parameter -CC to force console mode.
I don't have anything to add, but your CDC info rings bells. CDC was
based here in Minnesota. I remember Otto Schmitt giving a lecture
pushing "microcomputers" and how people at home could use one for
varied tasks. He got no thanks from the "big iron" guys.
Thanks,
Rick.
Thanks, I will try that out.
Scott Moore
Yea, those things are toys. It's just a passing fad....
Actually my favorite "what if" would have been if DEC had woken up and
and put the PDP-11 forward as the first 16 bit single chip processor
in the late 70s (yes, there was a chip LSI-11, but that was three chips,
complex and microprogrammed), and really pushing it as an embedded
processor with good software support. They would have laid waste to the
market and changed history utterly, instead of taking a 10 year ride to
oblivion.
Scott Moore
It works, thank you. I wasn't able to get that to also work using the
IDE, but that's enough information to remove that restriction.
I've tried to make the ISO 7185 - Delphi comparison as accurate as
possible, please don't hesitate to tell me if you see anything else
I got wrong.
Scott Moore
I've been playing in my mind to solve the alignment stuff using pluggable
file definitions, but I doubt it's possible. The problem is that the
type->string functionality is handled by hardcoded routines, and the
configurable part only does the actual writing of buffered strings.
Thank you for a great site. There is too little about Pascal left on the web.
Two typos, if you don't mind:
*great improvement on it's successors
->great improvement on its successors
http://www.standardpascal.org
*renumerations
->remuneration
http://www.standardpascal.org/compiler.html
As a Biophysics student I got around. The Chemistry lab where I worked
had a PDP-11 and I tried hard to learn to use it. Chem students were
building 8080 controls. Otto's EE lab had computers going back to tube
days (talk about refrigeration) and a PDP-4 and 8. Otto also had the
Altair.
Every system had it's good side and bad. The PDP systems were starting
Unix and data processing. The PDP key, IMHO, was the card bus. The
Altair was a pre-built 8080 with a pretty video. The genius of the PC
blended these experiments.
I'm now learning AVR microcontrollers. Funny how little has changed.
Vastly improved electronics, but the same concepts are still there.
There is still a need for readable, maintainable programming. Thanks
for helping anchor Pascal.
Rick.
Thanks. You might also check out my soft core 8080 on opencores.org.
This is the future for microcontrollers, with FPGAs so big and cheap,
you just park a soft core microprocessor in the corner and Voila, a
microcontroller with 200-400 I/O pins and all the onboard peripherals
you care to download.
Scott Moore
Errr, alignment restriction ????
Scott Moore
Thank you thank you, I'll fix that.
Scott Moore
Sorry, meant default fieldwidths, point 8.
I put together a short program for the FAQ that demonstrates the
differences between ISO 7185 and Delphi, it is attached below. If there
is anything here that got completed within FPC, let me know and I'll
note that in the FAQ.
And yes, while putting the program together I discovered another point.
Scott Moore
program dephitest(output);
label 1;
type r = record case b: boolean of true: (i: integer); false: (c: char) end;
var f: text;
c: char;
rp: ^r;
s1: packed array [1..10] of char;
s2: array [1..10] of char;
procedure x(procedure y); begin y end;
procedure z; begin goto 1 end;
procedure y; begin end;
begin
{ 1: Procedure and function parameters }
x(y);
{ 2: Interprocedure goto }
z;
1:
{ 3: File buffer handling }
rewrite(f);
writeln(f, 'hi there');
reset(f);
c := f^;
{ 4: Sized variant record allocation }
new(rp, false);
{ 5: Pack and unpack }
s1 := 'hi there ';
unpack(s1, s2, 1);
pack(s2, 1, s1);
{ 6: Comments as synonyms *)
writeln('This should print');
{ 7: Replacement of eoln with space }
rewrite(f);
writeln(f);
reset(f);
read(f, c);
writeln('The value of eoln is: ', ord(c));
writeln('Should be same as space (32)');
{ 8: Numbers and booleans with default width }
writeln(1);
writeln(true);
writeln(false);
writeln('Should be similar to:');
writeln;
writeln(' 1');
writeln(' true');
writeln('false');
writeln;
writeln('(ie., justified right in field)');
{ 9: Anonymous (temp) files }
rewrite(f);
end.
> { 8: Numbers and booleans with default width }
> writeln(1);
> writeln(true);
> writeln(false);
> writeln('Should be similar to:');
> writeln;
> writeln(' 1');
> writeln(' true');
Why the leading space in ' true'? (Ref: ISO 7185: 6.9.3.5, 6.9.3.6)
--
Chris Burrows
CFB Software
http://www.cfbsoftware.com/gpcp
===========================================================================
6.9.3.1 Write-parameters
A write-parameter shall have one of the following forms
e : TotalWidth : FracDigits
e : TotalWidth
e
where e shall be an expression whose value is to be written on the file
f and shall be of integertype, real-type, char-type, Boolean-type, or a
string-type, and where TotalWidth and FracDigits shall be expressions
of integer-type whose values shall be the field-width parameters . The
values of TotalWidth and FracDigits shall be greater than or equal to
one ; it shall be an error if either value is less than one.
Write(f,e) shall be equivalent to the form write(f,e : TotalWidth),
using a default value for TotalWidth that depends on the type of e ;
for integer-type, real-type, and Boolean-type, the default values
shall be implementation-defined.
6.9.3.5 Boolean-type
If e is of Boolean-type, a representation of the word true or the word
false (as appropriate to the value of e) shall be written on the file f.
This shall be equivalent to writing the appropriate character-string
'True' or 'False' (see 6 .9 .3 .6), where the case of each letter is
implementation-defined, with a field-width parameter of TotalWidth.
6.9.3.6 String-types
If the type of e is a string-type with n components, the default value
of TotalWidth shall be n . The representation shall consist of if
TotalWidth > n, (TotalWidth - n) spaces, the first through n-th
Characters of the value of e in that order. if 1 <= TotalWidth <= n,
the first through TotalWidth-th characters in that order.
==========================================================================
6.9.3.1 Says that the default parameter will be TotalWidth, and that
TotalWidth depends on the type of e. In 6.9.3.5, it says that writes
of boolean are equivalent to string writes, so the writes are:
write('true': TotalWidth);
write('false': TotalWidth);
6.9.3.6 Simply gives the rules of string writes.
This means that for a value of TotalWidth = 5 (the length of false), you
obtain the results shown. If the value is 4, you get:
true
fals
So that does not make sense. If you use 6.9.3.6 to argue that the value
of n is the length of the string, and therefore that Total width is 4
for true and 5 for false, ie., that totalwidth varies according to which
value of boolean is being output, you have done exactly what I did, and
I lost that argument. The two basic reasons are:
1. The language "Write(f,e) shall be equivalent to the form
write(f,e :TotalWidth), using a default value for TotalWidth that
depends on the type of e" says that TotalWidth depends on the TYPE of
e, not the VALUE of e.
2. Wirth himself didn't support the idea. Pascal-S, the P-system
and other examples of his work use the interpretation that one value
of TotalWidth exists for boolean.
Here is a previous discussion of this:
It's versus Its.
There's no shortcut; all you can do is memorize the rule. It's with an
apostrophe means it is (or, a little less often and a little less formally,
it has); its without an apostrophe means belonging to it. An analogue might
provide a mnemonic: think of "he's" ("he is" gets an apostrophe) and "his"
("belonging to him" doesn't).
What about its', with the apostrophe after the s? - Never, never, never.
Wrong, wrong, wrong. Not in this language, you don't. Its, "belonging to
it"; it's, it is. That's all. [Revised 8 June 2001.] see:
http://andromeda.rutgers.edu/~jlynch/Writing/i.html
Scott... you were right the first time. Same goes for "But in it's original
form". It should be "But in its original form".
Gary.
"scott moore" <nos...@nowhere.com> wrote in message
news:DYSdne29eIKEvc_a...@comcast.com...
Its or It's?
Its is the possessive pronoun; it modifies a noun.
It's is a contraction of it is or it has.
Incorrect: The mother cat carried it's kitten in it's mouth.
(Possessive pronoun, no apostrophe)
Correct: The mother cat carried its kitten in its mouth.
Correct: I think it's going to rain today.
(Contraction of it is)
Correct: It's been a very long time.
(Contraction of it has)
http://englishplus.com/grammar/00000227.htm
Gary.
"gedumer1" <gedu...@bellsouth.net> wrote in message
news:4806j.20685$rc2....@bignews1.bellsouth.net...
Rene was correct - and so is your explanation. However, you seem to have
confused the original mistake:
>> *great improvement on it's successors
with Rene's correction:
>> ->great improvement on its successors
--
In D7 compiler options -> linker tab -> "Exe and DLL Options" box ->
generate console application
Cool.
Scott Moore
And I thought Pascal generated a lot of corrections...
Yes, I'm sure we're all aware (all of us native speakers, at least).
It's just that sometimes we make a mistake.
>
> What about its', with the apostrophe after the s? - Never, never, never.
> Wrong, wrong, wrong. Not in this language, you don't.
Of course not. You wouldn't say its'. You'd say their.