Re: [fpc-pascal]isprime()

2003-02-07 Thread astlab
Hi Anton :) > Does the function return false for 0 and 1? Yes > How easy isit to upgrade for > 64 bit lengths? Indeed, isprime() is part of a routine working with the 'nat' big numbers of the unit bigint10. Its purpose is to perform a primality check by a strong test to the base 2 and a Lucas t

Re: [fpc-pascal]isprime()

2003-02-07 Thread Anton Tichawa
Hello, List! > I made a function of 116 lines in assembler: > > isprime(n: cardinal): boolean; Sounds good. > which returns true if a cardinal is prime, false otherwise. > The routine is fast and uses only an array of 18 cardinals and six > cardinals as local variables. Obviously it may be used

[fpc-pascal]isprime()

2003-02-07 Thread astlab
I made a function of 116 lines in assembler: isprime(n: cardinal): boolean; which returns true if a cardinal is prime, false otherwise. The routine is fast and uses only an array of 18 cardinals and six cardinals as local variables. Obviously it may be used by an external unit, anyhow let me know

Re: [fpc-pascal]Unit Graph with Linux (Knoppix) or alternative unit

2003-02-07 Thread Holger Peters
Hi, > You may want to have a look at the 4th or 5th GTK article on the website. > There I explain how you could set up such a thing. (It's the one with the > breakout game) I've already read this article, and I tried to write a Widget, that does this, but it does not work right (I'm searching sti

[fpc-pascal]Mouse question restated

2003-02-07 Thread Mark Emerson
Thanks for the replies. I'm NOT interested in running on text-based screens. I want to run in high resolution graphics and need a pixel granularity mouse driver for that purpose. What do people suggest? BTW, Michael, I would recommend stating at the top of the mouse and msmouse unit documentati

RE: [fpc-pascal]Performance testing of FPC programs?

2003-02-07 Thread Lee, John
2 choices, use profiling (see Marco's response), which is ok but a bit cumbersome IMHO, or add your own timing (this is what I do). I use clock from Tomas Schatzl's cpu unit which works for most o/s and also different pascals eg vpasc, fpc etc (1 microsec accuracy) and put in timing statements in t

Re: [fpc-pascal]Performance testing of FPC programs?

2003-02-07 Thread Marco van de Voort
> Hi all, I have a relatively large FPC program that I suspect have a few > bottlenecks (regarding processing speed). Are there any ways I can test how > long time the program spends in the different procedures/functions? If the platform is suitable: read in the manual about profiling support and

Re: [fpc-pascal]Performance testing of FPC programs?

2003-02-07 Thread Adam Naumowicz
Hello, On Fri, 7 Feb 2003, Preben Mikael Bohn wrote: > Hi all, I have a relatively large FPC program that I suspect have a few > bottlenecks (regarding processing speed). Are there any ways I can test how > long time the program spends in the different procedures/functions? Use the -pg to compil

Re: [fpc-pascal]Performance testing of FPC programs?

2003-02-07 Thread James Mills
On Fri, Feb 07, 2003 at 04:56:10PM +0100, Preben Mikael Bohn wrote: > Hi all, I have a relatively large FPC program that I suspect have a few > bottlenecks (regarding processing speed). Are there any ways I can test how > long time the program spends in the different procedures/functions? Use this

[fpc-pascal]Performance testing of FPC programs?

2003-02-07 Thread Preben Mikael Bohn
Hi all, I have a relatively large FPC program that I suspect have a few bottlenecks (regarding processing speed). Are there any ways I can test how long time the program spends in the different procedures/functions? Best regards Preben ___ fpc-pascal m

Re: [fpc-pascal]Linking to Windows

2003-02-07 Thread Hans Mårtensson
At 15:28 06-02-2003 +0100, you wrote: >You may use the GetProcAddress (Win32 API function) to retrieve the >procedure's START-ADDRESS, wehre the input parameter is EITHER an index, I >think of limited size, OR a name, that must be SPELLED CORRECTLY. > >If you try both, and look for MATCHING ADDRE

Re: [fpc-pascal]Mouse Unit

2003-02-07 Thread Sebastian Günther
Aitor Santamaría Merino schrieb: Not quite right. The quite old antivirus "Artemis Professional", ancestor of nowaday's Panda Antivirus, had a nice feature: it is textmode, but it used MS-MOUSE pixel granularity at text mode to display a "kind-of" graphic mode mouse: I guess it read the mouse

Re: [fpc-pascal]Mouse Unit

2003-02-07 Thread Aitor Santamaría Merino
Michael Van Canneyt wrote: On Thu, 6 Feb 2003, Mark Emerson wrote: The mouse unit appears to support resolution only at "character" granularity. What about pixels? That is not the purpose of this mouse unit. The mouse unit is intended for text-based screens only, so the character granulari

Re: [fpc-pascal]Mouse Unit

2003-02-07 Thread Michael Van Canneyt
On Thu, 6 Feb 2003, Mark Emerson wrote: > The mouse unit appears to support resolution only at "character" > granularity. What about pixels? That is not the purpose of this mouse unit. The mouse unit is intended for text-based screens only, so the character granularity is sufficient. Michael.