[fpc-pascal] What should I use for ARM EABI?

2007-07-16 Thread josepascual
Hi everyone,

I can build fpc for arm 2.2 (ver 2.1.5) and I can build 2.3.1 for with "-Ce
-CfSOFT" options.

I have a board with a ARM EABI systems, and I'd like to develop some
programs with freepascal for ARM.

Which should I use 2.2_beta or 2.3.1? 
Is softfloat implemented in both solution? or more implemented in 2.3.1?
I supose 2.2_beta is more stable than 2.3.1? or both version are stables in
the same way?

thank you

Jose Pascual


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] What should I use for ARM EABI?

2007-07-16 Thread Henry Vermaak

On 16/07/07, josepascual <[EMAIL PROTECTED]> wrote:

Hi everyone,

I can build fpc for arm 2.2 (ver 2.1.5) and I can build 2.3.1 for with "-Ce
-CfSOFT" options.

I have a board with a ARM EABI systems, and I'd like to develop some
programs with freepascal for ARM.

Which should I use 2.2_beta or 2.3.1?
Is softfloat implemented in both solution? or more implemented in 2.3.1?
I supose 2.2_beta is more stable than 2.3.1? or both version are stables in
the same way?



i see from the logs that yuri has been fixing some arm bugs.  i don't
know if they are merged yet, so i guess you should use the trunk for
now.  if they get merged you can use 2.2 after the release to ensure
stability.  just check mantis...

henry
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Building a i686-pc-mingw32 crosscompiler from i686-darwin

2007-07-16 Thread Adriaan van Os

Has anyone tried to build a Free Pascal Windows crosscompiler on an Intel Mac ? 
Is this supported ?

First I built and mingw binutils and then I tried

[p17:~/fpc-win32/fpc] adriaan% make all OS_TARGET=win32 CROSSBINDIR=/usr/bin 
BINUTILSPREFIX=i686-ming32- INSTALL_PREFIX=/usr/local

make compiler_cycle RELEASE=1
make -C compiler cycle
make OS_TARGET=darwin CROSSBINDIR= BINUTILSPREFIX= CROSSCYCLEBOOTSTRAP=1 
rtlclean rtl
make -C /Users/adriaan/fpc-win32/fpc/rtl clean
/bin/rm -f fpcmade.i386-darwin Package.fpc ppas.sh script.res link.res
/bin/rm -f *.s *_ppas.sh
make -C darwin clean

.

/bin/mkdir -p i386/units/i386-win32
/Users/adriaan/fpc-win32/fpc/compiler/ppcross386 -Twin32 -XPi686-ming32- -Xc -Xr -Ur -Xs -O2 -n 
-Fui386 -Fusystems -Fu/Users/adriaan/fpc-win32/fpc/rtl/units/i386-win32 -Fii386 -FD/usr/bin -FE. 
-FUi386/units/i386-win32 -dRELEASE   -di386 -dGDB -dBROWSERLOG -Fux86 pp.pas

Fatal: Can't find unit System used by pp
Fatal: Compilation aborted
make[3]: *** [ppc386.exe] Error 1
make[2]: *** [cycle] Error 2
make[1]: *** [compiler_cycle] Error 2
make: *** [build-stamp.i386-win32] Error 2

Regards,

Adriaan van Os
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Building a i686-pc-mingw32 crosscompiler from i686-darwin

2007-07-16 Thread Daniël Mantione


Op Mon, 16 Jul 2007, schreef Adriaan van Os:

> Has anyone tried to build a Free Pascal Windows crosscompiler on an Intel Mac
> ? Is this supported ?

Yes, you don't need a cross-compiler to cross-compile to different 
operating systems. With FPC 2.1.4+ you don't need binutils either to 
cross-compile to Win32.

Simply make the rtl:

cd /path/to/fpc/rtl/win32
make

Then simply compile your program:

fpc -Fu/path/to/fpc/rtl/units/i386-win32 -Twin32 myprogram.pas

Happy crosscompiling!

Daniël___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Building a i686-pc-mingw32 crosscompiler from i686-darwin

2007-07-16 Thread Adriaan van Os

Daniël Mantione wrote:


Op Mon, 16 Jul 2007, schreef Adriaan van Os:


Has anyone tried to build a Free Pascal Windows crosscompiler on an Intel Mac
? Is this supported ?


Yes, you don't need a cross-compiler to cross-compile to different 
operating systems. With FPC 2.1.4+ you don't need binutils either to 
cross-compile to Win32.


Ah, thanks for your reply.


Simply make the rtl:

cd /path/to/fpc/rtl/win32
make


I did that and it works. However, it doesn't seem to copy any files to 
usr/local/lib/fpc/2.3.1/units/i386-win32/. I tried


[p17:fpc/rtl/win32] adriaan% sudo make install
Password:
/usr/bin/install -m 755 -d /usr/local/lib/fpc/2.3.1/units/i386-win32/rtl
/usr/bin/install -c -m 644 ../../rtl/units/i386-win32/system.ppu 
../../rtl/units/i386-win32/objpas.ppu ../../rtl/units/i386-win32/macpas.ppu 
../../rtl/units/i386-win32/buildrtl.ppu ../../rtl/units/i386-win32/sysinitpas.ppu 
../../rtl/units/i386-win32/sysinitcyg.ppu ../../rtl/units/i386-win32/sysinitgprof.ppu 
../../rtl/units/i386-win32/ctypes.ppu ../../rtl/units/i386-win32/strings.ppu 
../../rtl/units/i386-win32/lineinfo.ppu ../../rtl/units/i386-win32/lnfodwrf.ppu 
../../rtl/units/i386-win32/heaptrc.ppu ../../rtl/units/i386-win32/matrix.ppu 
../../rtl/units/i386-win32/windows.ppu ../../rtl/units/i386-win32/winsock.ppu 
../../rtl/units/i386-win32/winsock2.ppu ../../rtl/units/i386-win32/initc.ppu 
../../rtl/units/i386-win32/cmem.ppu ../../rtl/units/i386-win32/dynlibs.ppu 
../../rtl/units/i386-win32/signals.ppu ../../rtl/units/i386-win32/dos.ppu 
../../rtl/units/i386-win32/crt.ppu ../../rtl/units/i386-win32/objects.ppu 
../../rtl/units/i386-win32/messages.ppu ../../rtl/units/i386-win32/rtlconsts.ppu 
../../rtl/units/i386-win32/sysconst.ppu ../../rtl/units/i386-win32/sysutils.ppu 
../../rtl/units/i386-win32/math.ppu ../../rtl/units/i386-win32/types.ppu 
../../rtl/units/i386-win32/strutils.ppu ../../rtl/units/i386-win32/dateutils.ppu 
../../rtl/units/i386-win32/varutils.ppu ../../rtl/units/i386-win32/variants.ppu 
../../rtl/units/i386-win32/typinfo.ppu ../../rtl/units/i386-win32/fgl.ppu 
../../rtl/units/i386-win32/classes.ppu ../../rtl/units/i386-win32/convutils.ppu 
../../rtl/units/i386-win32/stdconvs.ppu ../../rtl/units/i386-win32/cpu.ppu 
../../rtl/units/i386-win32/mmx.ppu ../../rtl/units/i386-win32/charset.ppu 
../../rtl/units/i386-win32/ucomplex.ppu ../../rtl/units/i386-win32/getopts.ppu 
../../rtl/units/i386-win32/winevent.ppu ../../rtl/units/i386-win32/sockets.ppu 
../../rtl/units/i386-win32/printer.ppu ../../rtl/units/i386-win32/video.ppu 
../../rtl/units/i386-win32/mouse.ppu ../../rtl/units/i386-win32/keyboard.ppu 
../../rtl/units/i386-win32/fmtbcd.ppu ../../rtl/units/i386-win32/winsysut.ppu 
../../rtl/units/i386-win32/sharemem.ppu /usr/local/lib/fpc/2.3.1/units/i386-win32/rtl

install: ../../rtl/units/i386-win32/rtlconsts.ppu: No such file or directory
make: *** [fpc_install] Error 71


Then simply compile your program:

fpc -Fu/path/to/fpc/rtl/units/i386-win32 -Twin32 myprogram.pas

Happy crosscompiling!


When I copy some of the .o and .ppu files by hand to /usr/local/lib/fpc/2.3.1/units/i386-win32, 
crosscompiling hello.pas works.


[p17:~/fpc/testfpc] adriaan% fpc -Fu/path/to/fpc/rtl/units/i386-win32 -Twin32 
hello.pas
Free Pascal Compiler version 2.3.1 [2007/07/14] for i386
Copyright (c) 1993-2007 by Florian Klaempfl
Target OS: Win32 for i386
Compiling hello.pas
Linking hello.exe
9 lines compiled, 0.1 sec, 27504 bytes code, 1144 bytes data

and hello.exe actually runs at the other side of the fence.

Regards,

Adriaan van Os

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Building a i686-pc-mingw32 crosscompiler from i686-darwin

2007-07-16 Thread Daniël Mantione


Op Mon, 16 Jul 2007, schreef Adriaan van Os:

> /usr/local/lib/fpc/2.3.1/units/i386-win32/rtl
> install: ../../rtl/units/i386-win32/rtlconsts.ppu: No such file or directory
> make: *** [fpc_install] Error 71

Most of the win32 rtl is built by a build unit called buildrtl.pp 
in the directory rtl/win32. rtlconsts is listed in this unit and should 
have been compiled. Could you check wether the compiler does the actual 
compilation of rtlconsts? If yes, where did it place the rtlconsts.ppu?

Daniël___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Master Detail relationship in SQLdb

2007-07-16 Thread Joost van der Sluis
On Sun, 2007-07-15 at 16:05 +0200, Martin Schreiber wrote:
> On Sunday 15 July 2007 13.06, Joost van der Sluis wrote:
> > On Sun, 2007-07-15 at 07:24 +0200, Martin Schreiber wrote:
> > > I needed to use my own TField descendants because I can not modify
> > > db.pp .
> >
> > Huh? Why can't you? You did change bufdataset and sqldb. Which are also
> > part of the same db-package?
> >
> Because of binary compatibility with other TDataset descendants.

Binary compitibility? At the TDataset level? That doesn't exist. What do
you mean?

> You are right, it would be an good idea to flush the whole Delphi ballast and 
> start from scratch.

That could be an good idea, yes. But that's not what you did with sqldb.
You copied the code, changed is somewhat, but your code has no advantage
over the original. There is only the disadvantage of the maintainability
now. Because you and me are doing double work while fixing bugs and
adding new features.

Joost.


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Freepascal IDE for MacOSX/x86

2007-07-16 Thread Jonas Maebe


On 15 Jul 2007, at 07:43, Weyert de Boer wrote:

I am trying to get the lightweight freepascal e.g. fpide working  
under MacOSX. Only I am not getting it compiled! Does anyone know  
of a place where this IDE is precompiled?


http://pascal-central.com/lwp/lightweight.html


Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Building a i686-pc-mingw32 crosscompiler from i686-darwin

2007-07-16 Thread Adriaan van Os

Daniël Mantione wrote:


Op Mon, 16 Jul 2007, schreef Adriaan van Os:


/usr/local/lib/fpc/2.3.1/units/i386-win32/rtl
install: ../../rtl/units/i386-win32/rtlconsts.ppu: No such file or directory
make: *** [fpc_install] Error 71


Most of the win32 rtl is built by a build unit called buildrtl.pp 
in the directory rtl/win32. rtlconsts is listed in this unit and should 
have been compiled. Could you check wether the compiler does the actual 
compilation of rtlconsts? If yes, where did it place the rtlconsts.ppu?


There was a /rtlconsts.ppu in objpas, which caused the problem. I think this was the result of my 
various experiments this morning. After checking out clean sources, "sudo make install worked" and 
also the crosscompiler.


[p17:~/fpc/testfpc] adriaan% fpc -Twin32 hello.pas
Free Pascal Compiler version 2.3.1 [2007/07/16] for i386
Copyright (c) 1993-2007 by Florian Klaempfl
Target OS: Win32 for i386
Compiling hello.pas
Linking hello.exe
9 lines compiled, 0.4 sec, 27504 bytes code, 1144 bytes data

Thanks,

Adriaan van Os

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Building a i686-pc-mingw32 crosscompiler from i686-darwin

2007-07-16 Thread Daniël Mantione


Op Mon, 16 Jul 2007, schreef Adriaan van Os:

> and hello.exe actually runs at the other side of the fence.

Note that you can install Wine (I'm not sure though how the Darwin port 
hasprogressed) to do testing. With Wine you can do the full development 
without a Windows computer and you only need to do some final 
compatibility testing on Win32.

Daniël
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Building a i686-pc-mingw32 crosscompiler from i686-darwin

2007-07-16 Thread Vincent Snijders

Daniël Mantione schreef:


Op Mon, 16 Jul 2007, schreef Adriaan van Os:


and hello.exe actually runs at the other side of the fence.


Note that you can install Wine (I'm not sure though how the Darwin port 
hasprogressed) to do testing. With Wine you can do the full development 
without a Windows computer and you only need to do some final 
compatibility testing on Win32.


Does wine run on intelmacs too? I didn't know that.

Vincent
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Building a i686-pc-mingw32 crosscompiler from i686-darwin

2007-07-16 Thread Daniël Mantione


Op Mon, 16 Jul 2007, schreef Vincent Snijders:

> Daniël Mantione schreef:
> > 
> > Op Mon, 16 Jul 2007, schreef Adriaan van Os:
> > 
> > > and hello.exe actually runs at the other side of the fence.
> > 
> > Note that you can install Wine (I'm not sure though how the Darwin port
> > hasprogressed) to do testing. With Wine you can do the full development
> > without a Windows computer and you only need to do some final
> > compatibility testing on Win32.
> 
> Does wine run on intelmacs too? I didn't know that.

Well, I see articles like this http://tweakers.net/nieuws/44225 , so 
people are definately working on it.

Daniël___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Building a i686-pc-mingw32 crosscompiler from i686-darwin

2007-07-16 Thread Felipe Monteiro de Carvalho

Since we are on the topic, I've been using Parallels Desktop for Mac
with a lot of success. It's pretty cheap, and you have 2 weeks to see
if you want to buy it. They have some bugs when running Linux, but
their Windows support is incredible. Windows seams to actually work
better and faster then in my PC Notebook =) Really

One downside is having to buy a Windows license only for this, but
this wasn't a problem for me as my University gives me free MS
products througth the Microsoft Academic Alliance.

--
Felipe Monteiro de Carvalho
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Building a i686-pc-mingw32 crosscompiler from i686-darwin

2007-07-16 Thread Adriaan van Os

Felipe Monteiro de Carvalho wrote:

Since we are on the topic, I've been using Parallels Desktop for Mac
with a lot of success. It's pretty cheap, and you have 2 weeks to see
if you want to buy it. They have some bugs when running Linux, but
their Windows support is incredible. Windows seams to actually work
better and faster then in my PC Notebook =) Really


Yes, I am running Parallels Desktop for Mac for that purpose also. I tried CrossOver some time ago 
and weren't impressed. Maybe things have improved since.


Regards,

Adriaan van Os
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Master Detail relationship in SQLdb

2007-07-16 Thread Martin Schreiber
On Monday 16 July 2007 13.50, Joost van der Sluis wrote:
> On Sun, 2007-07-15 at 16:05 +0200, Martin Schreiber wrote:
> > On Sunday 15 July 2007 13.06, Joost van der Sluis wrote:
> > > On Sun, 2007-07-15 at 07:24 +0200, Martin Schreiber wrote:
> > > > I needed to use my own TField descendants because I can not modify
> > > > db.pp .
> > >
> > > Huh? Why can't you? You did change bufdataset and sqldb. Which are also
> > > part of the same db-package?
> >
> > Because of binary compatibility with other TDataset descendants.
>
> Binary compitibility? At the TDataset level? That doesn't exist. What do
> you mean?
>
With a modified db.pp it is difficult to combine a TDBF and a tmsesqlquery 
without recompiling the RTL. MSEgui must work with the default FPC 2.0.4 
installation.

Martin
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Some questions about fpc.cfg

2007-07-16 Thread josepascual
Hi Everyone,

How can I used #IFDEF to check which is the Fpc Release (something like
#IFDEF FPC_RELEASE=4)?
I have several version of fpc (2.1.4, 2.1.5, 2.3.1) and fpc.cfg is different
in each case.
how can I check it?

or, Is there any form to use a #IFDEF in fpc.cfg if compiler where build
with CfSOFT or other/s option
in order to choose with -Fl different libraries to link?

thank you,

Jose Pascual

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Asking about Win units?

2007-07-16 Thread Irawan Tanudirdjo
Dear all,

Today, when I try to use Windows Common Control in
FPC, well I got error, and when I check in FPC
installation folder, I cannot found the implementation
for CommCtrl.o or CommCtrl.pp either. And also in last
week email, someone mentioned that WinSpool is not
implemented too.

Is it true, that these header files is not implemented
in FPC? May I know the reason why these files is not
implemented?

Thanks for the information.
Irawan T.


   

Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] msedb and fcl-db benchmarks

2007-07-16 Thread Joost van der Sluis
Hi all,

To see what the differences in speed are between MSEdb and fcl-db I did
some benchmarks. (See the attachment for the code and results)

I think that the first conclusion is that when it comes to executing
queries, opening connections to the database and such, the 'real sql-
work' there's no real difference. Which was to be expected, since the
code in that areas is practically the same.

But as soon the TBufDataset is used in the area it's designed for, there
are differences. Also not that strange, since this is the part that is
rewritten in MSEdb.

If you use a large dataset, (10 records, about 2020 bytes for each
record) simply opening the dataset and fetching all records is 7 times
slower with MSEdb. (OpenFetch test)

Further, when you 'scroll' through all records, and read-out all data,
MSEdb needs more time for every record. (ReadData test, see graph) 

The result is that if the dataset is opened, and scrolled from the begin
to the end and back again once, fcl-db is 6 times faster. If you do this
10 times, fcl-db is 'only' three times as fast. But the absolute time
difference is larger. 

If you open this same dataset, end change the first 20.000 records.
MSEdb is faster then fcl-db. (about 1.2 times) Thus you can conclude
that with editing large amount of datasets, msedb is faster, it so fast
that it overcomes the browse-slowlyness.

I think that the reason for the difference in editing is simple: to
spare memory fcl-db doesn't store the location of the edit-buffer with
each record-buffer. So it has to search the edit-buffer for every record
you want to change. I did that on purpose, since I thought that editing
this amount of records, without applying the changes, isn't something
that you do in a regular program.

If it comes to the use of RecNo, msedb beats fcl-db. Fetching the data
msedb is slower, offcourse. but then for each 'jump' it consumes almost
no time at all. (see JumprecNo graph, the first 'dot' is more a
randomness-thing if you use only 5 points)

But, on the other hand, if you use bookmarks to do the same thing. fcl-
db behaves just like msedb. Jumping through the records is fast.


I tried to explain the readdata-difference. At first I thought that
msedb converted all strings from string to widestring to string. But it
doesn't do that. (see my mails on this subject)

I think that the only reasonable explanation is the argument from
Michael: using ansistrings/pointers to store the data instead of storing
them directly into a buffer, induces so much overhead that it becomes
too slow.

Overall, I would conclude that the current design of the TBufDataset of
fcl-db is a better choice then the design of tmseBufDataset. Since fcl-
db is faster on those things a TBufDataset is build/meant for: browsing
through records.

Discussion: What tests could I do more? Is there something I overlooked?

Regards,
  Joost.
program bench;

{$mode objfpc}{$H+}

{ $Define SQLDB}

uses
  cthreads, Classes, SysUtils, db,
{$IFDEF SQLDB}
   sqldb, ibconnection;
{$ELSE}
   msqldb,mseibconnection;
{$ENDIF}
var AConn   : TSQLConnection;
ATrans  : TSQLTransaction;
AQuery  : TSQLQuery;

procedure CreateTable;

begin
  try
AConn.ExecuteDirect('drop table benchtest');
  except
// do nothing
  end;
  AConn.ExecuteDirect('create table benchtest (id int, shortstr varchar(10), longstr varchar(2000))');
  ATrans.CommitRetaining;
end;

procedure FillData;

  function GetRandomStr(MaxSize : Integer) : String;
  var b,size : integer;
  a  : string;
  begin
Size := Random(MaxSize);
SetLength(a,size);
for b := 1 to Size do
  a[b] := chr(Random(28)+65);
Result := a;
  end;

var i : integer;

begin
  Randomize;
  AQuery.SQL.Text := 'insert into benchtest (id,shortstr,longstr) values (:id,:shortstr, :longstr)';
  for i := 0 to 10 do
begin
AQuery.params[0].asinteger := i;
AQuery.Params[1].AsString := GetRandomStr(10);
AQuery.Params[2].AsString := GetRandomStr(2000);
AQuery.ExecSQL;
end;
  ATrans.CommitRetaining;
end;

Procedure ReadData(times : integer);
var s : string;
i : integer;
begin
  AQuery.SQL.Text := 'select * from benchtest';
  AQuery.Open;
  for i := 0 to times -1 do
begin
while not AQuery.EOF do
  begin
  s := AQuery.Fields[1].AsString;
  //writeln(s);
  s := AQuery.Fields[2].AsString;
  //writeln(s);
  AQuery.Next;
  end;

while not AQuery.BOF do
  begin
  s := AQuery.Fields[1].AsString;
  //writeln(s);
  s := AQuery.Fields[2].AsString;
  //writeln(s);
  AQuery.Prior;
  end;
end;

  AQuery.Close;
end;


Procedure OpenFetch;
var s : string;
begin
  AQuery.SQL.Text := 'select * from benchtest';
  AQuery.Open;
  AQuery.Last;
  AQuery.Close;
end;


Procedure JumprecNo(jumps : integer);
var s : string;
i : integer;
r : integer;
begin
  AQuery.SQL.Text := 'select * from benchtest';
  AQuery.Open;
  for i := 0 to jumps do
begin
r := Random(9);
AQ