Bill,

My sentiments exactly.... the problemo is that all the vcl and most 
3rd party libs are compiled with type string (using large model).  
They should have used ansistring instead.

Enter your old code compiled with small string model using string 
(or even using shortstring).

THe IDE and the compiler see the vcl string as "string" equating 
this with the shortstring as "string".... total madness... the code 
produced is rubbish.

There is no easy solution, all you can do is write your code 
properly which means that use shortstring where you want 
shortstring, use ansistring elsewhere... dont use the $H directive.  
There will still be some failures.... you just have to find them and 
rewrite the code so that the compiler does not produce garbage.

To:                     Multiple recipients of list delphi <[EMAIL PROTECTED]>
Send reply to:          [EMAIL PROTECTED]
From:                   [EMAIL PROTECTED] (Rohit Gupta)
Date sent:              Mon, 7 Jul 1997 15:34:48
Subject:                Re: [DUG]:  UPGRADING TO DELPHI 3
Priority:               normal

> Bill,
> 
> The major change is the string type.  It defaults to the large model. 
> What I do is to insert the following into all units 
> 
> {$ifdef WIN32} {$H-} {$endif WIN32}
> 
> You will still find places where the code simply breaks.  That is the 
> compiler generates rubbish.  I am still in the process of isolating 
> it to a small example.  Its taken my weeks with many tools to finally 
> track down the fact that the compiler has just generated meaningless 
> code.  It seems to me that its just confused about what string model 
> it should be using for VCL calls.
> 
> ------------
> Does anybody know what string model the VCL is compiled with ?  The 
> help just says that the relevant parameters are of the type 
> String.....   AAaarggghh.  But which string, the new one or the 255 
> one ?
> 
> Why cant the beggars just invent new typenames for new types such as 
> the new integer and the new string ?
> 
> ------------
> 
> 
> On  7 Jul 97 at 9:21, Bill Barclay wrote:
> 
> > For some time I have had an application running very happily under Delphi
> > 1.0.
> > 
> > I am now trying to upgrade it to Delphi Version 3, but am getting a host of
> > compile errors, for things like compatibility of string types and access to
> > text files.
> > 
> > Are there any compile options which give strict backward compatibility, or
> > do I need to rewrite the affected code error by error?
> > 
> > 
> > Bill Barclay
> > Barclay Traffic Planning
> > P O Box 31531 Lower Hutt
> > Tel. 04-570 0823 Fax 04-570 0546
> > ---------------------------------------------------------------------------
> >     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> >                   Website: http://www.delphi.org.nz
> > 
> Rohit
> 
> ======================================================================
> CFL - Computer Fanatics Ltd.
> PH    489-2280 
> FX    489-2290
> email [EMAIL PROTECTED]  or  [EMAIL PROTECTED]
> ======================================================================
> ---------------------------------------------------------------------------
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz


Regards

Rohit

======================================================================
CFL - Computer Fanatics Ltd.  21 Barry's Point Road, AKL, New Zealand
PH    (649) 489-2280 
FX    (649) 489-2290
email [EMAIL PROTECTED]  or  [EMAIL PROTECTED]
======================================================================

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to