Hey, the code I am having a problem with is more like:
TYPE PString = STRING[40]; pPString = ^PString;
VAR PPtr : pPString; ConsVers : String(15); BEGIN PPtr := @ConsVers; END.
test.pas:1425: assignment from incompatible pointer type
This code has worked with Turbo and SVS, but not GPC.
Thanks, Adam
-----Original Message----- From: Frank Heckenbach [mailto:frank@g-n-u.de] Sent: Friday, February 23, 2001 8:51 PM To: gpc@gnu.de Subject: Re: Strings, Lengths, etc
Oldham, Adam wrote:
Also, if I have a String[15] and String[20] and I want to assign a
variable
with the value in string15, is there a way to get the compiler to not complain that the types are different?
What do you mean? Assigning between strings of different capacity works without any warning or error:
program Foo;
var Foo: String (15); Bar: String (20);
begin Foo := Bar; Bar := Foo end.
Frank