Previous mail
Next mail
Unformatted/full headers
Overview 10 days
Subject
Date
Thread
Author
From: Gale Paeper
Subject: Internal compiler error with readstring
Date: 24 Jan 2006, 06:41:23
Waldek Hebisch wrote:
>
> Adriaan van Os wrote:
> > Peter Schorn wrote:
> >
> > > The following program crashes the compiler (gpc345u2 on Mac OS 10.4.4):
> > >
> > >
> > > program rs;
> > >
> > > { compile with gpc rs.pas }
> > >
> > > var a: integer;
> > >
> > > begin
> > > readstring(a); { internal compiler error: Bus error }
> > > end.
> >
> > Hmm, I think I caused this error, by adding ReadString to predef.def
> >
[snip]
>
> Is it just a single routine ("ReadString") or does Mac Pascal have also
> "WriteString"?
Mac Pascal has function that is basicly a functional form of
"WriteString". The function's name is "StringOf" and it returns a
string-type. So the difference between the two is the method used to
pass back to the caller the written to string. "WriteString" uses a
required string-variable first parameter; whereas, doesn't use a
required string-variable first parameter. Using ISO 10206 syntax
notation, a syntax comparison would be:
ISO 10206: writestr(s, p1, ... , pn)
versus
Mac Pascal: s := stringof(p1, ... , pn)
I'll note that Mac Pascal's have a few extensions in the types of
parameters allowed for Read and ReadString and THINK Pascal allows more
types for Write and StringOf. All three traditional Mac Pascal
compilers allow boolean type parameters for Read and ReadString which
ISO doesn't allow. THINK Pascal extends allowed types to include any
enumerated type for reading as well as writting. But to make that work
reasonably well, THINK Pascal doesn't do field width truncation on the
strings written out for boolean or enumerated types and thus avoids
having to handle reading write truncated strings for those types.
Gale Paeper
gpaeper@empirenet.com
Previous mail
Next mail
Unformatted/full headers
Overview 10 days
Subject
Date
Thread
Author
| Author | Subject | Date |
|---|---|---|
| Waldek Hebisch | Internal compiler error with readstring | 24 Jan 2006, 13:00:49 |
Note: This page contains information that does not originate from the owner of this web site, but from the authors of the mails archived. The owner of this web site is not responsible for the content of such information. Any use of that infomation requires the consent of the respective author.
Where WWW addresses (URLs) in the mails archived are marked as hyperlinks, this is only for the comfort of the reader. The content of the web pages linked to like this does not necessarily reflect the opinion of the owner of this web site or of the authors of the mails archived. The owner of this web site is not responsible for the content of such web pages. Those pages are explicitly not to be considered as part of the content of this page, but merely as references.
This page was created by Crystal 0.999 (Linux 2.4.27/i686).