[fpc-pascal] Function to know if WIN is 32 or 64

Juha Manninen juha.manninen62 at gmail.com
Wed Mar 16 13:21:57 CET 2011


Marcos Douglas kirjoitti keskiviikko 16 maaliskuu 2011 13:18:41:
> On Wed, Mar 16, 2011 at 12:56 AM, Robert Wolfe <wolfe.robwolfe at gmail.com> 
wrote:
> >   WriteLn ;
> >   {$IFDEF WIN32}
> >       WriteLn ('This is a 32-bit version of Windows.') ;
> >   {$ENDIF$}
> >   {$IFDEF WIN64}
> >       WriteLn ('This is a 64-bit version of Windows.') ;
> >   {$ENDIF}
> > 
> > End.
> > 
> > The value returned, however, depends on whether the 32-bit compiler of
> > the 64-bit cross-compiler was used.
> 
> Interesting. But I think not works on my case. The compiler is 32-bits
> but Windows can vary.

I was also thinking to suggest the compile time IFDEFs.
If the application is compiled for 32-bits then it can behave like a 32-bit 
application. No need to check anything at runtime.

For what do you need the run-time info?

Regards,
Juha



More information about the fpc-pascal mailing list