mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-01 11:51:01 +02:00
* define COMP_IS_INT64 for m68k cpu
This commit is contained in:
parent
413cfaef1b
commit
1ba8fd756e
@ -1,14 +1,24 @@
|
||||
{ Old file: tbs0333.pp }
|
||||
{ }
|
||||
|
||||
{$ifdef cpu68k}
|
||||
{$define COMP_IS_INT64}
|
||||
{$endif cpu68k}
|
||||
|
||||
|
||||
var
|
||||
a,b : comp;
|
||||
s1,s2 : string;
|
||||
begin
|
||||
a:=11384563;
|
||||
b:=a*a;
|
||||
{$ifdef COMP_IS_INT64}
|
||||
str(a*a,s1);
|
||||
str(b,s2);
|
||||
{$else not COMP_IS_INT64}
|
||||
str(a*a:0:0,s1);
|
||||
str(b:0:0,s2);
|
||||
{$endif COMP_IS_INT64}
|
||||
writeln(s1);
|
||||
writeln(s2);
|
||||
if (s1<>'129608274700969') or (s2<>'129608274700969') then
|
||||
|
@ -1,5 +1,9 @@
|
||||
Program ansitest;
|
||||
|
||||
{$ifdef cpu68k}
|
||||
{$define COMP_IS_INT64}
|
||||
{$endif cpu68k}
|
||||
|
||||
{$ifndef fpc}
|
||||
Function Memavail : Longint;
|
||||
begin
|
||||
@ -433,7 +437,11 @@ begin
|
||||
str(E,S);
|
||||
Writeln (S);
|
||||
Write ('str(Co,S)= ');
|
||||
{$ifdef COMP_IS_INT64}
|
||||
Co:=4;
|
||||
{$else}
|
||||
Co:=4.0;
|
||||
{$endif}
|
||||
str(Co,S);
|
||||
Writeln (S);
|
||||
Write ('str(Si,S)= ');
|
||||
|
@ -1,6 +1,12 @@
|
||||
{ Source provided for Free Pascal Bug Report 1269 }
|
||||
{ Submitted by "Rob Kolstad" on 2000-11-28 }
|
||||
{ e-mail: kolstad@ace.delos.com }
|
||||
|
||||
{$ifdef cpu68k}
|
||||
{$define COMP_IS_INT64}
|
||||
{$endif cpu68k}
|
||||
|
||||
|
||||
var
|
||||
A : array [0..25, 0..100] of comp;
|
||||
V : array [1..25] of longint;
|
||||
@ -36,7 +42,11 @@ begin
|
||||
v[10] := 10;
|
||||
for i := 0 to 25 do
|
||||
for j := 0 to nn do A[i, j] := -1;
|
||||
{$ifdef COMP_IS_INT64}
|
||||
writeln( calc(vt, nn));
|
||||
{$else not COMP_IS_INT64}
|
||||
writeln( calc(vt, nn) :0:0);
|
||||
{$endif COMP_IS_INT64}
|
||||
end.
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user