Oldham, Adam wrote:
> TYPE
> AnyStr = STRING[40];
> AnyStrPtr = ^AnyStr;
>
> VAR
> TestVar1 : AnyStrPtr;
> TestVar2 : AnyStrPtr;
> TestVar3 : AnyStr;
> TestVar4 : AnyStr;
>
> BEGIN
> TestVar3 := 'TEST1';
> TestVar1 := AnyStrPtr(@TestVar3);
> TestVar4 := 'TEST3';
> TestVar2 := AnyStrPtr(@TestVar4);
> writeln(TestVar1^);
> writeln(TestVar2^);
> MOVELEFT (TestVar1^, TestVar2^, (LENGTH(…
[View More]TestVar1^) + 1));
> writeln("");
> writeln("After");
> writeln(TestVar1^);
> writeln(TestVar2^);
> END. { unit pSos }
>
> With GPC, the output is:
> TEST1 -> (TestVar1)
> TEST3 -> (TestVar2)
>
> After
> TEST1 -> (TestVar1 after MoveLeft)
> TEST3 -> (TestVar2 after MoveLeft)
>
> With my old compiler, the output is:
> TEST1
> TEST3
>
> After
> TEST1
> TEST1
>
> As it basically copies the length bytes of TestVar1 into TestVar2. Now, my
> question, does GPC work differently for this function, and if yes or no, is
> this a bug.
Your old compiler was probably a Borland type, i.e. AnyStr are
one byte [0] containing the length and 40 bytes containing the chars.
This is why you moved length()+1 chars, 1 being for the zeroth char.
In gpc String is different. It is defined as:
type
String (Capacity : Integer) = record
Length : 0 .. Capacity;
String : packed array [1 .. Capacity + 1] of Char
end;
When you moves 6 chars, you move mainly the Capacity and (part of)
the Length field, this is why it seems you move nothing.
The result would be even stranger if the two strings had different
Capacity and/or Length.
One solution if you want to move only the chars would be
MOVELEFT (TestVar1^[1], TestVar2^[1], (LENGTH(TestVar1^)));
i.e. addresses of the first chars and no more +1.
This non pascal, C style or assembly style, kind of programming
can work only if you know exactly the internals of your system,
down to binary level. Otherwise it opens a can of worms and any porting
from one system to another is a very efficient bug generator,
as you have checked.
For example If you tried to move also the Capacity and Length fields
to solve your problem, the result would depend on undefined things
like alignment of these fields: try to write SizeOf(AnyStr).
On my system it is 52, instead of 40 + 1 + 2*SizeOf(integer) = 49:
alignment on a four bytes (integer) boundary.
String assignment is probably the right way of doing !
So this is definitely not a bug of gpc, rather a bug entailed by
Borland style programming.
Hope this helps
Maurice
--
Maurice Lombardi
Laboratoire de Spectrometrie Physique,
Universite Joseph Fourier de Grenoble, BP87
38402 Saint Martin d'Heres Cedex FRANCE
Tel: 33 (0)4 76 51 47 51
Fax: 33 (0)4 76 51 45 44
mailto:Maurice.Lombardi@ujf-grenoble.fr
[View Less]
In the last few days I have been getting this message
for the summary of gpc postings:
Seems that message/rfc822 data was corrupted.
Has something changed on the list? Is someone
putting weird stuff into their email messages?
I use elm (old but a better design than mutt!!) to
read my email.
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.…
[View More]mit.edu
http://www.lecb.ncifcrf.gov/~toms/
[View Less]
Maurice,
thanks for the prompt response.
I was just showing an example of the our source files. This whole software
is composed on a couple hundred files (about 95% in Pascal, some C, and a
couple in assembly). The whole thing is then linked. So there is only one
file with the program header. All other source files just contain
procedures in Pascal or C functions.
In this particular instance, I am trying to make a program where a C program
calls the Pascal routine.
Regards,
Jing
-----…
[View More]Original Message-----
From: Maurice Lombardi [mailto:Maurice.Lombardi@ujf-grenoble.fr]
Sent: Thursday, July 05, 2001 11:42 AM
To: Gloria, Jing
Cc: 'gpc(a)gnu.de'
Subject: Re: Compiling Source Files w/o Program Statement
Gloria, Jing wrote:
> I have installed GPC and GCC on a Solaris 7 x86 platform. We are
> migrating software from RISC/SPARC Sun OS to x86 Solaris 7.
>
> GPC is version 19991030. based on 2.95 19990728. GCC is 2.95.2.
>
> The GPC Mailing List archive web site has been unreachable. I apologize
> if the following question has already be addressed in the past.
>
> Problem: GPC will not compile our Pascal source files since they do not
> have any Program statements.
>
> Sample program:
>
> Procedure hello;
> begin
> Writeln ('PASCAL says: Hello, world.');
> Writeln (' ')
> End;
>
> ****end of sample program****
>
> When I run GPC (gpc -c filename), I get the following messages:
> warning: missing program header
> parse error at end of input
>
> The only way I found to get gpc to compile is by adding:
> Begin
> End.
>
> at the end of the source file. I still get the warning message about
> missing program header but GPC compiles. I would prefer not to do this
> since we will be using the same source files for the maintenance of the
> software in both SPARC/RISC and Intel x86 platforms.
What a "program" which contains only the declaration of
a procedure is intended to do ?
It cannot lead to anything executable ?
Maurice
--
Maurice Lombardi
Laboratoire de Spectrometrie Physique,
Universite Joseph Fourier de Grenoble, BP87
38402 Saint Martin d'Heres Cedex FRANCE
Tel: 33 (0)4 76 51 47 51
Fax: 33 (0)4 76 51 45 44
mailto:Maurice.Lombardi@ujf-grenoble.fr
[View Less]
I have installed GPC and GCC on a Solaris 7 x86 platform. We are migrating
software from RISC/SPARC Sun OS to x86 Solaris 7.
GPC is version 19991030. based on 2.95 19990728. GCC is 2.95.2.
The GPC Mailing List archive web site has been unreachable. I apologize if
the following question has already be addressed in the past.
Problem: GPC will not compile our Pascal source files since they do not
have any Program statements.
Sample program:
Procedure hello;
begin
Writeln ('PASCAL says: …
[View More]Hello, world.');
Writeln (' ')
End;
****end of sample program****
When I run GPC (gpc -c filename), I get the following messages:
warning: missing program header
parse error at end of input
The only way I found to get gpc to compile is by adding:
Begin
End.
at the end of the source file. I still get the warning message about
missing program header but GPC compiles. I would prefer not to do this
since we will be using the same source files for the maintenance of the
software in both SPARC/RISC and Intel x86 platforms.
Pls reply to my e-mail address. I am not yet registered in the gpc mailing
list.
Thanks in advance for any assistance extended.
Regards,
Jing
Texas Instruments
Sherman, TX
[View Less]
The following unsolicited message was sent to the GNU Pascal mailing
list from inside your network, in violation of your acceptable use
policy. The originating host is pm5port4.stmarys.pcidu.com
[208.29.96.24]. This is the fourth spam I have received from
stmarys.pcidu.com today and the fifth this week. I intend to block
further email from stmarys.pcidu.com to salford-systems.com until you
notify me that this abuser has been terminated.
-------------------------------------------------------…
[View More]
John L. Ries
Salford Systems
Phone: (619)543-8880 x25 or (760)765-4738
FAX: (619)543-8888 E-Mail: jries(a)salford-systems.com
_______________________________________________________
---------- Forwarded message ----------
Return-Path: <gpc-owner+M4(a)gnu.de>
Received: from adele.gerwinski.de (adele.Gerwinski.de [217.69.76.193])
by scott.salford-systems.com (8.11.1/8.11.1) with ESMTP id
f646S1m23769
for <jries(a)salford-systems.com>; Tue, 3 Jul 2001 23:28:01 -0700 (PDT)
Received: from localhost ([::ffff:127.0.0.1] helo=gnu.de)
by adele.gerwinski.de with smtp (Exim 3.12 #1 (Debian))
id 15HfVa-0004yN-00; Wed, 04 Jul 2001 07:47:30 +0200
Received: from tiku.hut.fi ([::ffff:130.233.228.86])
by adele.gerwinski.de with esmtp (Exim 3.12 #1 (Debian))
id 15HfVU-0004yD-00
for <gpc(a)gnu.de>; Wed, 04 Jul 2001 07:47:24 +0200
Received: from sclserver.designworkshop.cl (planarltda.manquehue.net
[200.27.201.207])
by tiku.hut.fi (8.9.3/8.9.3) with ESMTP id IAA30409;
Wed, 4 Jul 2001 08:46:47 +0300 (EET DST)
From: jb4700(a)hotmail.com
Received: from 208.29.96.24 ([208.29.96.24])
by sclserver.designworkshop.cl (Lotus Domino Release 5.0.5)
with SMTP id 2001070316542485:548 ;
Tue, 3 Jul 2001 16:54:24 -0400
Message-ID: <00004dfd58b3$0000060c$000074fe(a)208.29.96.24>
To: <indor(a)hotmail.com>
Subject: ENLARGE YOUR PENIS GUARANTEED
29950
Date: Sat, 07 Jul 2001 01:42:39 -0400
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
Errors-To: ntnomgnwo5th1(a)iupi.pt
X-MIMETrack: Itemize by SMTP Server on SCLServer/design workshop
chile(Release 5.0.5 |September
22, 2000) at 03-07-2001 16:54:26,
Serialize by Router on SCLServer/design workshop chile(Release
5.0.5 |September
22, 2000) at 04-07-2001 01:50:03,
Serialize complete at 04-07-2001 01:50:03
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
charset="iso-8859-1"
Precedence: bulk
Sender: gpc-owner(a)gnu.de
MEN.....Stop Being Ashamed Of Your Penis Size!
Women Get This For Your Boyfriend/Husband
It REALLY WORKS!
CLICK HERE NOW TO BE AMAZED
To be taken off our mailing list, simply send an email to here with
your email address in the body of the email.
****
[View Less]
The following unsolicited message was sent to the GNU Pascal mailing
list. It uses a mailbox on your system (vgicncenetcheung(a)yahoo.com) to
receive responses in violation of your acceptable use policy. Please
investigate this matter and punish the perpetrator accordingly.
-------------------------------------------------------
John L. Ries
Salford Systems
Phone: (619)543-8880 x25 or (760)765-4738
FAX: (619)543-8888 E-Mail: jries(a)salford-systems.com
…
[View More]_______________________________________________________
---------- Forwarded message ----------
>From kd307(a)hotmail.com Wed Jul 04 14:21:40 2001
Return-Path: <gpc-owner+M6(a)gnu.de>
Received: from adele.gerwinski.de (adele.Gerwinski.de [217.69.76.193])
by scott.salford-systems.com (8.11.1/8.11.1) with ESMTP id
f648MBm23728
for <jries(a)salford-systems.com>; Wed, 4 Jul 2001 01:22:12 -0700 (PDT)
Received: from localhost ([::ffff:127.0.0.1] helo=gnu.de)
by adele.gerwinski.de with smtp (Exim 3.12 #1 (Debian))
id 15HhcK-0005Lq-00; Wed, 04 Jul 2001 10:02:36 +0200
Received: from tiku.hut.fi ([::ffff:130.233.228.86])
by adele.gerwinski.de with esmtp (Exim 3.12 #1 (Debian))
id 15HhcD-0005Lh-00
for <gpc(a)gnu.de>; Wed, 04 Jul 2001 10:02:29 +0200
Received: from chillan.dportales.cl (IDENT:root@[200.28.88.98])
by tiku.hut.fi (8.9.3/8.9.3) with ESMTP id LAA07219;
Wed, 4 Jul 2001 11:02:19 +0300 (EET DST)
From: kd307(a)hotmail.com
Received: from 208.29.114.32 (pm9port12.stmarys.pcidu.com [208.29.114.32])
by chillan.dportales.cl (8.9.3/8.8.7) with SMTP id LAA32171;
Thu, 31 May 2001 11:34:19 -0400
Message-ID: <0000433a17af$000038df$000055de(a)208.29.114.32>
To: <jwchoe(a)hotmail.com>
Subject: Re: Information that you have requested
21982
Date: Fri, 06 Jul 2001 16:40:56 -0400
MIME-Version: 1.0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
X-Priority: 3
X-MSMail-Priority: Normal
Errors-To: cveuftrgvrs(a)loja.net
Precedence: bulk
Sender: gpc-owner(a)gnu.de
[ The following text is in the "iso-8859-1" character set. ]
[ Your display is set for the "US-ASCII" character set. ]
[ Some characters may be displayed incorrectly. ]
<html>
<body alink="#FFFFFF" vlink="#FFFFFF" link="#FFFFFF">
<div align="center">
<center>
<table bgColor="#000000" border="0" cellPadding="0" cellSpacing="0" width="596">
<tbody>
<tr>
<td align="center" colSpan="2" vAlign="top" width="590" bgcolor="#000000">
<p align="center"><font color="#000000"><font face="Webdings" size="6">e </font><b><font face="Verdana" size="5" color="#FFFFFF">Earn
</font></font><font face="Verdana" size="5" color="#FF0000">$1500</font><font face="Verdana" size="5" color="#FFFFFF"> Or More Per Week!
</font> </b>
</td>
</tr>
<tr>
<td colSpan="2" vAlign="top" width="590">
<table bgColor="black" border="0" cellPadding="0" cellSpacing="0" height="1" width="596">
<tbody>
<tr>
<td><img height="1" width="1"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td align="center" bgColor="#FFB13E" height="17" vAlign="center" width="89">
<div align="center">
</div>
</td>
<td align="right" bgColor="#FFB13E" height="17" vAlign="center" width="501">
<div align="center">
<b><font size="2" face="Arial">This offer is limited to the first 49
people who contact me today!</font></b>
</div>
</td>
<tr>
<td align="center" colSpan="2" vAlign="top" width="590" bgcolor="#B0D8FF">
<table bgColor="black" border="0" cellPadding="0" cellSpacing="0" height="1" width="596">
<tbody>
<tr>
<td><img height="1" width="1"></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</center>
</div>
<div align="center">
<center>
<table align="center" border="0" cellPadding="0" cellSpacing="0" width="596" height="1" bgcolor="#000000">
<tbody>
<tr>
<td align="center" bgColor="#000000" vAlign="top" height="118">
<div align="center">
<center>
<table border="0" cellPadding="0" cellSpacing="0" bgcolor="#000000">
<tbody>
<tr>
<td width="10" bgcolor="#FFFF00"></td>
<td align="center" vAlign="top" bgcolor="#FFFF00">
<p align="center"><br>
<font face="Verdana" size="2">Let's face it, every business
opportunity is not for everyone. You need something that
fits your needs, budget, and schedule. That is why we have
put together several <b><font color="#ff0000">"Real"
</font>Income Opportunities</b> just for you. We have searched
and searched and finally found and compiled the best
opportunities available. </font></p>
<p align="center"><font face="Verdana" size="2">I promise, you
will not regret it. You will finally find something you truly
can make Money with. You really can make an <b>Extra $200
to $1,500 a Week</b> if you have a few hours a week to work
your business!</font></p>
<p align="center"><font face="Verdana" size="2">You do not have to
pay one dime to find out about these true money making
opportunities.<span style="mso-spacerun: yes"> </span>Just
<b>Call 1(800)234-8190</b> and we will show you the best, <b>real</b>
moneymakers available.<span style="mso-spacerun: yes"> </span>It
is <b>100% FREE</b>, so visit us today, do not miss out on a
life changing opportunity.</font></p>
<p><font face="Verdana" size="2">This is <b>Absolutely</b> <font color="#ff0000"><b>No
Risk</b></font>, so <b>Call 1(800)234-8190</b> Right Now, and <b>Find The Opportunity of A
Lifetime</b>!</font></p>
<p>
</td>
<td width="10" bgcolor="#FFFF00"></td>
</tr>
<tr>
<td colSpan="3" height="10" width="437" bgcolor="#FFFF00">
<p align="center"><b></font><font face="Verdana" size="4">Call 1(800)234-8190 Immediatly<b><br>24 Hrs / 7 Days</font></b></a></p>
<p align="center"> </p>
</td>
</tr>
</tbody>
</table>
</center>
</div>
</td>
<td align="center" bgColor="#000000" vAlign="top" width="1" height="118"> </td>
<td bgColor="#000000" height="1" rowSpan="2" vAlign="top" width="150">
<div align="center">
<font color="#FFFFFF" size="2" face="Arial"><b>-
Testimonials -</b></font>
</div>
<div align="center">
</div>
<div align="center">
<font size="2" face="Arial" color="#FFFFFF">"My very
first day with less than an hour of my spare
time I made over $123.00. My second day I
duplicated that in less than 30
minutes."<br>
</font>
</div>
<div align="center">
<font size="2" face="Arial" color="#FFFFFF">Jason Vielhem</font>
</div>
<div align="center">
<font size="2" face="Arial" color="#FFFFFF">"Mr.
Skeptical"</font>
</div>
<div align="center">
<font color="#FFFFFF"><b>---------------</b></font>
</div>
<div align="center">
</div>
<div align="center">
<font size="2" face="Arial" color="#FFFFFF">"I
literally make thousands each month from the
comfort of my home, heck my couch! Thank you
for changing my life forever!"</font>
</div>
<div align="center">
</div>
<div align="center">
<font size="2" face="Arial" color="#FFFFFF">Jenna Wilson</font>
</div>
<p align="center"><font color="#FFFFFF"><b>---------------</b></font>
</td>
</tr>
</tbody>
</table>
</center>
</div>
<div align="center">
<center>
<table bgColor="#000000" border="0" cellPadding="0" cellSpacing="0" width="596" height="1">
<tr>
<td align="center" bgColor="#000000" height="1" vAlign="center" width="590">
<font face="Arial" size="1" color="#000000">a</font>
</td>
</table>
</center>
</div>
<p> </p>
<p><br>
<br>
<br>
<br>
<br>
</p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<div align="center">
<center>
<table bgColor="#000000" border="0" cellPadding="0" cellSpacing="0" width="596" height="1">
<tr>
<td align="center" bgColor="#3C3C3C" height="1" vAlign="center" width="590">
<p align="center"><font face="Arial" size="2" color="#FFFFFF">Put your email address in body of email and send email to <a href="mailto:vgicncenetcheung@yahoo.com">here</a><b></font>
</td>
</table>
</center>
</div>
<br>~~~~~~~~~~~~
</BODY>
</HTML>
[View Less]
The following unsolicited message was sent to the GNU Pascal mailing
list (gpc(a)gnu.de) from inside of your network in violation of your
acceptable use policy. The originating host is
pm9port12.stmarys.pcidu.com [208.29.114.32]. This is the 3rd spam I
have received from stmarys.pcidu.com today and the 4th this week.
Please terminate this abuser immediately (see my last complaint from a
few minutes ago).
-------------------------------------------------------
John L. Ries
Salford Systems
…
[View More]Phone: (619)543-8880 x25 or (760)765-4738
FAX: (619)543-8888 E-Mail: jries(a)salford-systems.com
_______________________________________________________
---------- Forwarded message ----------
Return-Path: <gpc-owner+M6(a)gnu.de>
Received: from adele.gerwinski.de (adele.Gerwinski.de [217.69.76.193])
by scott.salford-systems.com (8.11.1/8.11.1) with ESMTP id
f648MBm23728
for <jries(a)salford-systems.com>; Wed, 4 Jul 2001 01:22:12 -0700 (PDT)
Received: from localhost ([::ffff:127.0.0.1] helo=gnu.de)
by adele.gerwinski.de with smtp (Exim 3.12 #1 (Debian))
id 15HhcK-0005Lq-00; Wed, 04 Jul 2001 10:02:36 +0200
Received: from tiku.hut.fi ([::ffff:130.233.228.86])
by adele.gerwinski.de with esmtp (Exim 3.12 #1 (Debian))
id 15HhcD-0005Lh-00
for <gpc(a)gnu.de>; Wed, 04 Jul 2001 10:02:29 +0200
Received: from chillan.dportales.cl (IDENT:root@[200.28.88.98])
by tiku.hut.fi (8.9.3/8.9.3) with ESMTP id LAA07219;
Wed, 4 Jul 2001 11:02:19 +0300 (EET DST)
From: kd307(a)hotmail.com
Received: from 208.29.114.32 (pm9port12.stmarys.pcidu.com [208.29.114.32])
by chillan.dportales.cl (8.9.3/8.8.7) with SMTP id LAA32171;
Thu, 31 May 2001 11:34:19 -0400
Message-ID: <0000433a17af$000038df$000055de(a)208.29.114.32>
To: <jwchoe(a)hotmail.com>
Subject: Re: Information that you have requested
21982
Date: Fri, 06 Jul 2001 16:40:56 -0400
MIME-Version: 1.0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
X-Priority: 3
X-MSMail-Priority: Normal
Errors-To: cveuftrgvrs(a)loja.net
Precedence: bulk
Sender: gpc-owner(a)gnu.de
e Earn $1500 Or More Per Week!
[IMAGE]
This offer is limited to the first 49 people who contact me today!
[IMAGE]
Let's face it, every business opportunity is not for everyone. You
need something that fits your needs, budget, and schedule. That is why
we have put together several "Real" Income Opportunities just for you.
We have searched and searched and finally found and compiled the best
opportunities available.
I promise, you will not regret it. You will finally find something you
truly can make Money with. You really can make an Extra $200 to $1,500
a Week if you have a few hours a week to work your business!
You do not have to pay one dime to find out about these true money
making opportunities. Just Call 1(800)234-8190 and we will show you
the best, real moneymakers available. It is 100% FREE, so visit us
today, do not miss out on a life changing opportunity.
This is Absolutely No Risk, so Call 1(800)234-8190 Right Now, and Find
The Opportunity of A Lifetime!
Call 1(800)234-8190 Immediatly
24 Hrs / 7 Days
- Testimonials -
"My very first day with less than an hour of my spare time I made over
$123.00. My second day I duplicated that in less than 30 minutes."
Jason Vielhem
"Mr. Skeptical"
---------------
"I literally make thousands each month from the comfort of my home,
heck my couch! Thank you for changing my life forever!"
Jenna Wilson
---------------
a
Put your email address in body of email and send email to here
~~~~~~~~~~~~
[View Less]
Mark E. wrote:
> On Mon, 25 Jun 2001 11:10:32 +0200, you wrote:
>
>
>> Here it is, compiled with
>> gpc -g -S -O3 fay.pas
>>
>
>
> I get the same error message using 2.11, but none in the patched version of 2.11.2.
> It would seem the fix I applied for a different bug reported a few days ago fixes
> your case as well. The fix will be in the djgpp version of binutils 2.11.2 available
> in a few days from the djgpp mirrors and I'll work on …
[View More]getting it in to a future
> version of binutils.
OK It works now with bnu2112a/b.zip
Many thanks !
Maurice
--
Maurice Lombardi
Laboratoire de Spectrometrie Physique,
Universite Joseph Fourier de Grenoble, BP87
38402 Saint Martin d'Heres Cedex FRANCE
Tel: 33 (0)4 76 51 47 51
Fax: 33 (0)4 76 51 45 44
mailto:Maurice.Lombardi@ujf-grenoble.fr
[View Less]