Source file: /~heha/BETA/matdde32.zip/SRC/POKETEST.PAS

program poketest;
uses Windows,PasMex32,dde_init;
{$APPTYPE CONSOLE}
var
 sp: PChar;
 x,xx,y,yy:LongInt;
 da,dp: PDouble;
 f: File;
 datalen: UInt;
begin
 sp:=Pointer(LocalAlloc(LMEM_Fixed,100000));
 assign(f,'d:in'); Reset(f,1);
 blockread(f,sp^,100000,x);
 close(f);
 sp[x]:=#0;
 str_count_numbers(sp,x,y);
 writeLn('x=',x,' y=',y);
 dp:=PDouble(Alloc_Datalen(XlTable,x,y,datalen));
 da:=dp;
 PrepareXlTable(da,x,y);
 str_to_numbers(sp,x,y,da,true);
 assign(f,'d:out'); ReWrite(f,1);
 blockwrite(f,dp^,datalen);
 close(f);
 writeln(sizeof(uint),' ',sizeof(word),' ',sizeof(integer));
 if x*y<100 then begin
  da:=dp; Inc(PChar(da),12);
  for xx:=x downto 1 do begin
   for yy:=y downto 1 do begin
    Write(da^:7); Inc(da); if x>1 then Write(' ');
   end;
   WriteLn;
  end;
 end;
end.
Detected encoding: ASCII (7 bit)2