Previous mail
Next mail
Unformatted/full headers
Overview 10 days
Subject
Date
Thread
Author
From: Eike Lange
Subject: External variables and constants
Date: 18 Mar 2003, 14:08:57
On Tue, Mar 18, 2003 at 01:37:31PM +0100, Adriaan van Os wrote:
> Is it correct that an external variable can be declared in GPC as
> follows:
> var eV: integer; external; asmname 'eV';
Yes. In future releases, this statement might be
var
Foo: Integer; external name 'Bar';
> Is there a similar construct to declare external constants ('extern
> const' in C) ?
Not as constants.
In C:
baz.c
const int _c_bar = 42;
In GNU Pascal (future release):
baz.pas
var
Foo: const Integer; external name '_c_bar';
(As far as I remember)
A disadvantage of those constants is, that you cannot use them in
a `case' statement.
Eike
Previous mail
Next mail
Unformatted/full headers
Overview 10 days
Subject
Date
Thread
Author
| Author | Subject | Date |
|---|---|---|
| Adriaan van Os | External variables and constants | 18 Mar 2003, 13:37:31 |
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).