system.pas_(re)

Thu, 19 Jun 1997 15:01:19 +0100 (BST)


On Thu, 19 Jun 1997 15:36:20 +0200 Frank Heckenbach  
wrote:
>
>The African Chief wrote:
>
>> I am not sure I understand what you mean. However, the idea is
>> this. GPC is a 32-bit compiler that wants to support the BP syntax;
>> so we try to do support the *syntax* - thereby helping BP folks to
>> move their programs to 32-bit.; so we keep the data structures in
>> their 32-bit format - but, if, for some reason, a person who wants
>> to move his 16-bit programs to 32-bit with GPC still wants his
>> data types to be exactly as they are in a 16-bit compiler, then he
>> has to remove a dot on one line in the unit wherein the data types
>> are defined, and recompile his program.
> 
>Yes, I see the problem. So your defaults are to use the bigger types.
>I don't think that's a problem for most programs (though I just saw
>one that wanted to write a LongInt, and gpc can't yet write 64 bit
>variables -- but, of course, it would make more sense to implement
>this feature into the RTL than to restrict the size for that reason :-).

Agreed :-)=

>I'm not sure I really understood how your declaration looks like. Is it
>the following:
>
>{.$ifdef borland-16-bit}

No. SYSTEM.INC	 (which is $INCLUDEd into GPCTYPES.PAS)
contains this;

{.$DEFINE _Borland_16_Bit_}   { 16-bit Borland data types }
{$DEFINE _Borland_Pascal_}   { Borland string types }

{$ifdef _Borland_16_Bit_}
   {$DEFINE _Borland_Pascal_}
{$endif _Borland_16_Bit_}

[...]
>> The problem with $define is that it does not export from units. Will
>> this be a problem?
> 
>Yes! :-(

Yes, it is giving me problems with certain things in the cygwin32 C 
headers. It would have made things a lot easier if they could be 
exported in units - but you can't have everything ! ;-)

>The only way to do it (AFAICS) are include files, or defines on the command
>line. (BTW: does "-Drandom=RandReal" or such work, or could it be made to
>work?) 

I am not sure.

>Would it seem reasonable (and feasible) to propagate defines
>(either all of them, or only those that are specially marked) through
>.gpi files? At first sight, I'd think so.

That would make my life a lot easier with translating C macros to
Pascal. However, it may be of dubious long-term benefif. At the 
moment, I have to translate all those C macros into Pascal 
functions. This is bit tedious, but it is probably better in the 
long run. Who knows?

Best regards, The Chief 
Dr Abimbola A. Olowofoyeku (The African Chief, and the Great Elephant)
Author of:  Chief's Installer Pro v3.60 for Win16 and Win32.
Homepage:  http://ourworld.compuserve.com/homepages/African_Chief/
E-mail: laa12@cc.keele.ac.uk



The African Chief (laa12@cc.keele.ac.uk)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es