Hi, everybody,
as you know, The African Chief wrote a program `GPCC' that adds
Borland-style command syntax to GPC. It works as a wrapper,
translates options and then calls `gpc'.
Since we got no reports about problems with this utility, we can
integrate it into GPC now.
What about creating a new directory `utils' in the GPC source
directory where GPCC and other development tools especially
written for GPC can be stored? Its `Makefile' would (currently)
only have to `gpc --automake' each …
[View More]utility and then install it
in the `<prefix>/bin' directory.
Any comments?
Peter
--
Peter Gerwinski, Essen, Germany, http://home.pages.de/~Peter.Gerwinski/
Maintainer GNU Pascal - http://home.pages.de/~GNU-Pascal/ - gpc-19990118
PGP key on request - 6C 94 45 BE 28 A4 96 - 0E CC E9 12 47 25 82 75
*** Vote against SPAM! ********* http://www.politik-digital.de/spam/ ***
[View Less]
Peter Gerwinski <peter(a)gerwinski.de> writes:
> * Multiple compilations in one file.
>
> One source file contains one program and several units, or
> an interface and an implementation module, or whatever which
> has more than one `end.' (please note the dot).
>
> Hammering this behaviour of GPC into the GCC/EGCS backend is
> a nontrivial change which I do not expect the GCC steering
> committee to accept. (They already rejected …
[View More]much less
> crucial changes.) Thus, removing this feature would
> probably be necessary for full integration into GCC/EGCS.
Can the `program'/`end.', `unit'/`end.' tokens be treated like C
#ifdef, #endif pairs such that there must be an equal number of each
within a source file otherwise it is flagged as an error.
Perhaps the pre-processor should combine a program and it's units in
much the same way as you would #include a file in C rather than leaving
it up to the compiler.
Nick.
[View Less]
To whom it may concern,
I want to contribute my SVGA graphic library for the development of GNU
Pascal. Anyone interested ?
It has been made since 1996.
Limitation : it will only run on Intel processors, since some functions
were made with assembly.
You can download the files from http://cyest.hypermart.net, but the
version there was outdated. But it's still good. It works much better
than Borland BGI engine, without requiring any BGI drivers at all. The
compiled executable size is also …
[View More]smaller than that of Borland's with its
BGI.
It support up to High Color 1024x768
Please e-mail me if you're interested. I'll distribute the FULL source
code, with, of course, new license.
Prana
[View Less]
pdietrich(a)synstar.de wrote:
> The exponentiation operator cannot be used in expressions for lower/upper bound
> of subrange definitions.
> The compiler issues two different error messages:
> If a unary minus is present, the error message is "parse error before **",
> otherwise it is "subrange bounds are not of the same type".
> There is also a lot "extra semicolon" messages for lines following the "parse
> error".
The result of the `**' operator is of type real, so it …
[View More]can't be used
where an integer is expected. For integer exponentiation, you can
use the `pow' operator. (That's like `/' and `div' for real/integer
division.)
> program test (output);
>
> type
> utriple = 0..2**24-1;
> triple = -2**23..2**23-1;
> begin
> end.
>
> F:\PROJECTS\ISIDATA\isidef>gpc -c test6.pas
> test6.pas:4: subrange bounds are not of the same type
> test6.pas:5: parse error before `**'
> test6.pas:5: extra semicolon
There is a real bug in GPC in that expressions can't be used as
lower subrange bounds. We'd like to fix it, but it turns out to be
very difficult with the parser we're using, so if anyone has
experience with parsers and could help here...
As a workaround, you can declare a constant, so the following works:
program test (output);
const
foo = -2 pow 23;
type
utriple = 0..2 pow 24-1;
triple = foo..2 pow 23-1;
begin
end.
Frank
--
Frank Heckenbach, frank(a)g-n-u.de, http://fjf.gnu.de/
GPC To-Do list, latest features, fixed bugs:
http://agnes.dida.physik.uni-essen.de/~gnu-pascal/todo.html
[View Less]
Hello,
I found the following bug(s) in the Beta version of GPC.
Best regards,
Peter Dietrich
--------------------
GPC-Version (gpc -v):
Reading specs from C:\usr\local\lib\gcc-lib\i386-mingw32\2.8.1\specs
gpc version 19990118, based on gcc-2.8.1
System-Version:
Windows NT 4.0 on i386
Problem description:
The exponentiation operator cannot be used in expressions for lower/upper bound
of subrange definitions.
The compiler issues two different error messages:
If a unary minus is present, …
[View More]the error message is "parse error before **",
otherwise it is "subrange bounds are not of the same type".
There is also a lot "extra semicolon" messages for lines following the "parse
error".
The compiler is happy, if I compute the result of the expression myself, and
substitute the computed result.
The syntax is ok for the Digital VMS Pascal compiler.
program test (output);
type
utriple = 0..2**24-1;
triple = -2**23..2**23-1;
begin
end.
F:\PROJECTS\ISIDATA\isidef>gpc -c test6.pas
test6.pas:4: subrange bounds are not of the same type
test6.pas:5: parse error before `**'
test6.pas:5: extra semicolon
[View Less]
Orlando Llanes wrote:
> On Thu, 22 Jul 1999, Frank Heckenbach wrote:
> > (OT: Linux also has sound and since version 2.2 also graphics
> > built-in if you select them...)
>
> But the only standard way of accessing sound in Linux costs $$$ :)
> (OpenSound, open, cha! Right!).
Yes, this naming is misleading, but at least for me, the default
(free) drivers work fine.
> > So, you could just get the GCC and GPC sources and try to build it.
> > Perhaps it …
[View More]will just work, or there will be only minor issues that
> > can easily be solved. And if you succeed, you can upload the binary
> > to Agnes. :-)
>
> I'd love to :) I'll post as soon as I have any results. I wish I had a
> Mac Performa 6360 (6460? I forget which one), it runs the PowerPC version
> of BeOS (BeOS is on a hybrid CD), would be cool to have a PPC GNU Pascal
> with assembler and everything :)
Good luck!
Frank
--
Frank Heckenbach, frank(a)g-n-u.de, http://fjf.gnu.de/
GPC To-Do list, latest features, fixed bugs:
http://agnes.dida.physik.uni-essen.de/~gnu-pascal/todo.html
[View Less]
Orlando Llanes wrote:
> I have BeOS 3.x and 4.5, they are both POSIX compatible far as I
> know. To me, BeOS looks like Linux with graphics and sound capabilities
> built-in.
(OT: Linux also has sound and since version 2.2 also graphics
built-in if you select them...)
> I don't know about sh (though it uses a "Terminal" program which is
> prolly compatible), but it does have a version of GCC with it, so all
> tools should be in place (4.5 is better than 3.x because …
[View More]GCC, and its
> tools, is in the path).
So, you could just get the GCC and GPC sources and try to build it.
Perhaps it will just work, or there will be only minor issues that
can easily be solved. And if you succeed, you can upload the binary
to Agnes. :-)
Frank
--
Frank Heckenbach, frank(a)g-n-u.de, http://fjf.gnu.de/
GPC To-Do list, latest features, fixed bugs:
http://agnes.dida.physik.uni-essen.de/~gnu-pascal/todo.html
[View Less]
Orlando Llanes wrote:
> Maybe someone oughta make a "real" BeOS port of GPC :) I don't know if
> it's possible on version 3.x of BeOS since it does not use the COFF format
> (but Be is not going to support BeOS 3 for long anyway). But the weird
> thing is that BeOS 3 has a GCC compiler. I think that the OS specific
> calls use a lib anyway, so it *might* be a simple matter of recompiling
> GPC. I don't know if BeOS' GCC is capable of creating GUI apps, if it is,
> GPC …
[View More]can easily do so as well.
All it takes is a port of the binutils (i.e., as and ld), a GCC
backend (the harder part is the processor specific part, and this,
of course, exists already for the other OS's), and some standard
libraries, in particular a more-or-less POSIX compatible libc.
I don't know if BeOS is (or aims to be) POSIX compliant, but even if
not, it is possible to write a POSIX layer on top of the system,
like e.g. DJGPP which provides a very faithful and extensive POSIX
layer on top of Dos which is about as far from POSIX as possible. ;-)
If GCC works on BeOS, then there probably are already binutils and
the backend, and also the libraries unless the compiler is used only
for non-standard programs, so indeed it might be a simple matter of
recompiling. (Compiling natively on BeOS requires some more tools
like sh, make, sed, etc., but if they don't exist and can't be
compiled, it's also possible to cross-compile GPC for BeOS from,
say, a Linux host.)
Frank
--
Frank Heckenbach, frank(a)g-n-u.de, http://fjf.gnu.de/
GPC To-Do list, latest features, fixed bugs:
http://agnes.dida.physik.uni-essen.de/~gnu-pascal/todo.html
[View Less]
The following program:
program bug(input,output);
var
x : real;
begin
x := 0.5000000000000E+00;
writeln(' x = ',x:10:3);
end.
incorrectly prints out
x = 5.000
It should print out
x = 0.500
This program was compiled with
GNU Pascal version 19990118, based on gcc-2.8.1, compiled Jun 15 1999 09:46:03.
gpc --verbose
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/2.8.1/specs
gpc version 19990118, based on gcc-2.8.1
ld -m …
[View More]elf_i386 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/gcc-lib/i686-pc-linux-gnu/2.8.1/crtbegin.o -L/usr/lib/gcc-lib/i686-pc-linux-gnu/2.8.1 -lgpc -lm -lgcc -lc -lgcc /usr/lib/gcc-lib/i686-pc-linux-gnu/2.8.1/crtend.o /usr/lib/crtn.o
/usr/lib/crt1.o(.text+0x36): undefined reference to `main'
Rick Butler
[View Less]
Dr A A Olowofoyeku wrote:
> > > they have a port of GPC 2.1 :)
> >
> > 8-) Cool! Since we do not have v2.1 ourselves yet, perhaps we
> > should ask them for a copy of their source? ;-)
>
> They do seem to have a port of GPC v2.1 (or so they claim).
Unfortunately, the latter...
In src/Read me!, it says:
GNU Pascal for BeOS
gpc-19980830.tar.gz
This is, as you know, of course, not 2.1, but a beta version more or
less close to the upcoming 2.1...
I …
[View More]suppose we should point out this difference to them, as well as
the fact that distributing the binary without the source, as they
do, is illegal according to the GPL. I know that Be has violated the
GPL in another case, but perhaps some day they'll learn...
Frank
--
Frank Heckenbach, frank(a)g-n-u.de, http://fjf.gnu.de/
GPC To-Do list, latest features, fixed bugs:
http://agnes.dida.physik.uni-essen.de/~gnu-pascal/todo.html
[View Less]