* fixed test program - bug #40072

This commit is contained in:
Tomas Hajny 2022-12-31 15:26:00 +01:00
parent 45b15c5750
commit abbec0eb9b
2 changed files with 5 additions and 24 deletions

View File

@ -4,12 +4,12 @@ program calc_e;
const fac:array[0..7] of word=(1,1,2,6,24,120,720,5040); const fac:array[0..7] of word=(1,1,2,6,24,120,720,5040);
var e:fixed; var e:real;
i:byte; i:byte;
begin begin
e:=0; e:=0;
for i:=0 to 7 do for i:=0 to 7 do
e:=e+fixed(1)/fac[i]; e:=e+1/fac[i];
writeln(e); writeln(e);
end. end.

View File

@ -1,31 +1,12 @@
program modeinfo; program modeinfo;
type viomodeinfo=record uses viocalls;
cb:word; { length of the entire data structure }
fbType, { bit mask of mode being set }
color: byte; { number of colors (power of 2) }
col, { number of text columns }
row, { number of text rows }
hres, { horizontal resolution }
vres: word; { vertical resolution }
fmt_ID, { attribute format }
attrib: byte; { number of attributes }
buf_addr,
buf_length,
full_length,
partial_length:longint;
ext_data_addr:pointer;
end;
Pviomodeinfo=^viomodeinfo;
function _VioGetMode (var Amodeinfo:viomodeinfo;viohandle:word):word;[C]; var mode:Tviomodeinfo;
function _VioSetMode (var Amodeinfo:viomodeinfo;viohandle:word):word;[C];
var mode:viomodeinfo;
begin begin
mode.cb:=sizeof(mode); mode.cb:=sizeof(mode);
writeln('getmode= ',_viogetmode(mode,0)); writeln('getmode= ',viogetmode(mode,0));
writeln('cb= ',mode.cb); writeln('cb= ',mode.cb);
writeln('fbtype= ',mode.fbtype); writeln('fbtype= ',mode.fbtype);
writeln('color= ',mode.color); writeln('color= ',mode.color);