Maurice Lombardi wrote:
> same problem with gmp. The new gmp 3 is incompatible with the gmp 2.2 used by gpc for a stupid
> reason: all names in the library have been prepended by a g. It is probably only necessary to update
> accordingly the interface gmp.pas
I'm aware of this problem, and working on it. It's a little tricky
to do it in such a way that GMP 2.x will still work, but Peter and I
have found a way how to do it.
Frank
--
Frank Heckenbach, frank(a)g-n-u.de, http://fjf.…
[View More]gnu.de/
GPC To-Do list, latest features, fixed bugs:
http://agnes.dida.physik.uni-essen.de/~gnu-pascal/todo.html
[View Less]
program timebug(output);
(*
Dr. Thomas D. Schneider
National Cancer Institute
Laboratory of Experimental and Computational Biology
Frederick, Maryland 21702-1201
toms(a)ncifcrf.gov
permanent email: toms(a)alum.mit.edu
http://www.lecb.ncifcrf.gov/~toms/
According to:
8.255 TimeStamp
http://agnes.dida.physik.uni-essen.de/~gnu-pascal/gpc_389.html#SEC389
and
7.10.8 Date And Time Routines
http://agnes.dida.physik.uni-essen.de/~gnu-pascal/gpc_109.html#SEC109
and also
http://agnes.…
[View More]dida.physik.uni-essen.de/~gnu-pascal/gpc_114.html#SEC114
(TIME HANDLING ROUTINES)
but
timebug.p: In function `pascal_main_program':
timebug.p:57: TimeStamp record type parameter required
What did I do wrong?
*)
const
version = 1.00; (* of timebug.p 2000 July 17
origin 2000 Jul 17 *)
type
TimeStamp = {@@packed} record
DateValid,
TimeValid : Boolean;
Year : Integer;
Month : 1 .. 12;
Day : 1 .. 31;
DayOfWeek : 0 .. 6; { 0 means Sunday }
Hour : 0 .. 23;
Minute : 0 .. 59;
Second : 0 .. 61; { to allow for leap seconds }
MicroSecond : 0 .. 999999
end;
var
t: TimeStamp;
begin
GetTimeStamp(t);
end.
[View Less]
Hello everybody!
As I already have had a problem with compilation under unix, I would like to
know if this following error is something related to or something else:
bathy.p: In function `Principal':
bathy.p:977: constant out of range
The line in question is:
for ii:=1 to nsites do
begin
larves[ii]:=round(0.7*pop_max*fec*sex*ferti);
and the constant:
const
r = 1000000;
pop_max = 750000;
max = 10000;
sex = 0.5;
fec = 1000000;
ferti = 0.8;
I …
[View More]don't really understand because if I run a little program only with these
lines, it works, but not in the whole program.
And, the whole program with lower values works.
So, do I have to declare the constants with something else?... Or what?...
Thanks a lot in advance,
Nathalie
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
[View Less]
Couperin wrote:
> I worry about those ancient files that I don't find in
> gpc-20000707-i586-pc-msdosdjgpp-v203.zip : pc.exe, epc.exe,
> bpc.exe, gpc-cpp.exe. Are they no more needed ?
pc, epc, bpc have been dropped. They were just equivalent to
`gpc --standard-pascal', `gpc --extended-pascal' and
`gpc --borland-pascal', respectively, and these forms can be used
now if necessary.
gpc-cpp was renamed to gpcpp.
> Previously, I had libcurso.a in the /lib directory and it seems
> …
[View More]the Crt unit needed it. Is it the same now ? (I installed PDCurses
> 2.4 but it doesn't produce a libcurso.a file)
The file is called differently when PDCurses is built (curses.a or
such I think). You can manually rename it (the `lib' prefix is so
that it's found by the linker the normal way, and the `curso' rather
than `curses' is to fit in 8+3). Same with libpanel.a (panel.a)
probably. (In the PDCurses binary on agnes, the files are renamed
already.)
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]
Maurice Lombardi wrote:
> It needs only very minor changes to the sources to work. They are contained in the two attached
> diffs to apply to gpc-20000707 and gcc-2952 source directories.
> - the gpc-20000707.diff corrects for an already reported problem with djgpp where pwd under
> command.com respond c:\djgpp\ garbling ADD_RTS_PARENT_DIR in make-lang.in
>
> ! ADD_RTS_PARENT_DIR = sed -e 's,-B\([^/]\),-B../../\1,g;s,^\([^/][^ ]*\),../../\1,'`
> ! ADD_RTS_PARENT_DIR =…
[View More] sed -e 's,-B\([^/][^:]\),-B../../\1,g;s,^\([^/][^:][^ ]*\),../../\1,'`
I think this should be:
ADD_RTS_PARENT_DIR = sed -e 's,-B\([^/][^:]\),-B../../\1,g;s,^\([^/][^ :]*\),../../\1,'
But I'm wondering what the space is about, anyway (can the name of
the compiler ever be a single character?), so I think the following
is also ok:
ADD_RTS_PARENT_DIR = sed -e 's,-B\([^/][^:]\),-B../../\1,g;s,^\([^/][^:]*\),../../\1,'
Another problem is that your change would miss, e.g., `-B.' if it's
at the end of the string. I think the easiest way to fix it is where
ADD_RTS_PARENT_DIR is used:
# The ' ' is there so, e.g., `-B.' will be replaced by ADD_RTS_PARENT_DIR
RTS_COMPILERS = CC="`echo $(GCC_FOR_TARGET)' ' | $(ADD_RTS_PARENT_DIR)`" \
PC="`echo $(GPC_FOR_TARGET)' ' | $(ADD_RTS_PARENT_DIR)`"
I'm changing this in the official sources now.
The gcc patch is Peter's area. However, I'm skeptical about the
manifest files since they would have to be updated often. I've
written a script mkdjgppgpczip which automatically creates manifest
etc. It's included in the script directory. It works for
cross-building from Linux, might need adjustments for native DJGPP
building (never tried that).
> When running the demos I have found
>
> - gpc-in-c.h in the unit directory is not in a standard search directory for C header files,
> I moved it manually (in the zip) into the %DJGPP%\lib\gcc-lib\djgpp\2.952\include
Peter, can we just install it there by default, or do we need
permission from the GCC developers?
> - intfiledemo.pas does not work. Cannot rewrite a non assigned file under djgpp
This should work (works for me in DosEmu). Does GetTempFileName
return a valid name?
program Foo;
uses GPC;
begin
Writeln (GetTempFileName);
Writeln (GetTempDirectory);
CheckInOutRes
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]
Couperin wrote:
> I discovered a small bug in GPC FAQ (Reference : shr) :
> It give as an example : "a:= -127 shr 4; (* yields -7 *)" which is
> false, it yields -8 !
>
> I think we have to take care when manipulating bits of negative
> integers.
> A ShortInt with value-1 is coded 11111111b ! (-2 is 11111110b, -3 is
> 11111101b and so on)
> If the last bit is 1 (that means the number is negative), the 'shr'
> operator replaces the right new bits by 1.
> …
[View More]Examples (Considering ShortInt type (8 bits)) :
> -127 (coded 10000001b) shr 4 yields -8 (coded 11111000b)
> -1 (coded 11111111b) shr 1 yields -1 !
You're right, `shr 4' is different from `div 16' in that `div'
rounds towards minus infinity while `div' round towards 0.
I'm fixing it in the manual (the compiler's behaviour is correct),
thanks for the hint.
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 would to work with Gnu Pascal on Linux Mandrake 7.02
I have downloaded several files :
gpc-19990118-1.i386-pc-linux-gnu.rpm
gpc-19990118.i586-pc-linux-gnulibc1.tar.gz
gpc-19990118.tar.gz
gpc-2.0.tar.gz
gpc-extras-19990118-1.i386-pc-linux-gnu.rpm
install-gpc-binary
Can somebody say to me which file is the better to install ? (i know how to
install them)
Can somebody say to me what environment variables to define to access to the
units because i have installes GPC on another …
[View More]compiler but i coudn't compile
programs with the crt or other included units ?
Thank you
Jean-Philippe
[View Less]
I discovered a small bug in GPC FAQ (Reference : shr) :
It give as an example : "a:= -127 shr 4; (* yields -7 *)" which is
false, it yields -8 !
I think we have to take care when manipulating bits of negative
integers.
A ShortInt with value-1 is coded 11111111b ! (-2 is 11111110b, -3 is
11111101b and so on)
If the last bit is 1 (that means the number is negative), the 'shr'
operator replaces the right new bits by 1.
Examples (Considering ShortInt type (8 bits)) :
-127 (coded 10000001b) shr …
[View More]4 yields -8 (coded 11111000b)
-1 (coded 11111111b) shr 1 yields -1 !
--
"Couperin"
[View Less]
Dear GPC Folks:
GPC is poised to become even more important.
My Sysadmin found out the following:
"I sent an online query using SunSolve about the status of the Pascal
compiler. A Sun support person just called and said it was no longer a SUN
product. He said its last ship date was 1997 and SUN's End-of-Service life
policy says some support 4-5 years after last ship date."
"SUN apparently has decided to drop the product and someone purchasing a new
SUN may not be able to purchase the …
[View More]compiler from SUN. The SUN web site
refers to the Edinburgh Portable Compilers and their EPC Pascal-E product.
www.epc.co.uk/pce.html"
"Best hope is probably the "gpc" effort."
I agree with him ... Keep up the good work!!
(I'll continue to help when I can.)
Tom
Dr. Thomas D. Schneider
National Cancer Institute
Laboratory of Experimental and Computational Biology
Frederick, Maryland 21702-1201
toms(a)ncifcrf.gov
permanent email: toms(a)alum.mit.edu
http://www.lecb.ncifcrf.gov/~toms/
[View Less]
Nathalie Jarosz wrote:
> Hello everybody!
>
> As I already have had a problem with compilation under unix, I would like to
> know if this following error is something related to or something else:
> bathy.p: In function `Principal':
> bathy.p:977: constant out of range
>
> The line in question is:
> for ii:=1 to nsites do
> begin
> larves[ii]:=round(0.7*pop_max*fec*sex*ferti);
>
> and the constant:
> const
> r = 1000000;
…
[View More]> pop_max = 750000;
> max = 10000;
> sex = 0.5;
> fec = 1000000;
> ferti = 0.8;
>
> I don't really understand because if I run a little program only with these
> lines, it works, but not in the whole program.
Please, when reporting bugs, always post *complete* test programs.
Otherwise, we have incomplete information and can only guess.
The following "little program only with these lines" gives the same
error message on my system. That's correct since the value of the
constant is larger than MaxInt (2^31-1), and therefore cannot be
stored in an integer (if you're on a 64 bit system, it might work).
If you declare larves as `LongInt' which has a larger range than
`Integer' (-2^63 .. 2^63-1), it should work. If that's still not
enough for you, you can look at the GMP unit...
program foo;
const
r = 1000000;
pop_max = 750000;
max = 10000;
sex = 0.5;
fec = 1000000;
ferti = 0.8;
nsites = 10;
var
ii : Integer;
larves : array [1 .. nsites] of Integer;
begin
for ii:=1 to nsites do
larves[ii]:=round(0.7*pop_max*fec*sex*ferti);
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]