On Thu, 20 Apr 2006, constantijnw wrote:
Michael Van Canneyt wrote:
http://www.freepascal.org/wiki/index.php/Writing_portable_code_regarding_the_processor_architecture#32_Bit_vs._64_Bit
And of course the documentation:
http://www.freepascal.org/docs-html/prog/prog.html
more specifically:
http://www.freepascal.org/docs-html/prog/progap7.html#x291-293000G
Amazing, isn't it ;-)
Amazing discoveries indeed, but how do these documents relate to my question
specifically, i.e. how to fill in the mssign word:
Well:
begin
{$if sizeof(pointer)=4 }
Writeln('4');
{$else }
Writeln('8');
{$endif }
end.
or
begin
{$ifdef CPU64 }
Writeln('8');
{$else }
Writeln('4');
{$endif }
end.
or
begin
{$ifdef CPU32 }
Writeln('4');
{$else }
Writeln('8');
{$endif }
end.
Michael.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal