Re: [fpc-pascal] VirtualTreeview Mac (Carbon)

2010-06-01 Thread CA Gorski
Lazarus/LCL has added most of the needed functions, but it's not released yet. I am using the daily snapshot anyway. Are they in there? And if so, what is to do? Remove the dependencies on lclextensions from your port? ___ fpc-pascal maillist -

Re: [fpc-pascal] VirtualTreeview Mac (Carbon)

2010-06-01 Thread Luiz Americo Pereira Camara
CA Gorski escreveu: Lazarus/LCL has added most of the needed functions, but it's not released yet. I am using the daily snapshot anyway. Are they in there? Yes And if so, what is to do? Remove the dependencies on lclextensions from your port? Yes Luiz

Re: [fpc-pascal] power?

2010-06-01 Thread Burkhard Carstens
Am Sonntag, 30. Mai 2010 20:38 schrieb spir ☣: > On Sun, 30 May 2010 18:28:47 +0200 > > Reimar Grabowski wrote: > > On Sun, 30 May 2010 15:03:03 +0200 > > > > spir ☣ wrote: > > > PS: is there a round(fractional_size) function? that's the reason > > > why i needed power. > > > > http://community.f

[fpc-pascal] PChar & AnsiString

2010-06-01 Thread spir ☣
Hello, The documentation in the ref manual about PChar may have i bit more details: http://www.freepascal.org/docs-html/ref/refsu13.html#x36-390003.2.7 Do the following statements hold true? * This type is mainly intended to interface with C code (or for low-level needs?). Else AnsiString shou

Re: [fpc-pascal] PChar & AnsiString

2010-06-01 Thread Felipe Monteiro de Carvalho
2010/6/1 spir ☣ : > * Like C strings, and unlike AnsiString-s (even if the latter also are > "pointed") Sure if you cast an AnsiString to a PChar it will only go until the first #0. You can't magically add capabilities to the PChar type. > * How is length computed (traversal?)? It isn't compute

Re: [fpc-pascal] PChar & AnsiString

2010-06-01 Thread Michael Van Canneyt
On Tue, 1 Jun 2010, spir ☣ wrote: Hello, The documentation in the ref manual about PChar may have i bit more details: http://www.freepascal.org/docs-html/ref/refsu13.html#x36-390003.2.7 Do the following statements hold true? * This type is mainly intended to interface with C code (or for l

Re: [fpc-pascal] VirtualTreeview Mac (Carbon)

2010-06-01 Thread CA Gorski
And if so, what is to do? Remove the dependencies on lclextensions from your port? Yes Ok, I will try... Meantime I tried to compile lclextensions against gtk2 but the compiler still uses includes from include/carbon sub-folder. Why? ___

Re: [fpc-pascal] PChar & AnsiString

2010-06-01 Thread spir ☣
On Tue, 1 Jun 2010 13:05:16 +0200 (CEST) Michael Van Canneyt wrote: [...] Thank you for all answers (all is now clear for me :-). > > * If a programmer explicitely assigns an existing string to a new variable, > > the intent is precisely copy-semantics, to make them independent for > > furthe

Re: [fpc-pascal] PChar & AnsiString

2010-06-01 Thread Jonas Maebe
On 01 Jun 2010, at 14:28, spir ☣ wrote: On Tue, 1 Jun 2010 13:05:16 +0200 (CEST) Michael Van Canneyt wrote: This is not correct. Many strings are simply referenced several times. May I ask in which typical cases? The most common one is probably assigning a function result to a variabl

Re: [fpc-pascal] PChar & AnsiString

2010-06-01 Thread Martin
On 01/06/2010 11:23, spir ☣ wrote: What is the actual benefit of copy-on-write? I ask because of the following reasoning: * If a string is just used at several places, for example in output or into bigger strings, then there is no reason reason to copy it into a new variable. * If a programmer

Re: [fpc-pascal] PChar & AnsiString

2010-06-01 Thread spir ☣
On Tue, 01 Jun 2010 15:00:47 +0100 Martin wrote: > On 01/06/2010 11:23, spir ☣ wrote: > > What is the actual benefit of copy-on-write? I ask because of the following > > reasoning: > > * If a string is just used at several places, for example in output or into > > bigger strings, then there is

Re: [fpc-pascal] PChar & AnsiString

2010-06-01 Thread spir ☣
On Tue, 1 Jun 2010 14:36:36 +0200 Jonas Maebe wrote: > > On 01 Jun 2010, at 14:28, spir ☣ wrote: > > > On Tue, 1 Jun 2010 13:05:16 +0200 (CEST) > > Michael Van Canneyt wrote: > > > >> This is not correct. Many strings are simply referenced several > >> times. > > > > May I ask in which typic

Re: [fpc-pascal] PChar & AnsiString

2010-06-01 Thread Martin
On 01/06/2010 16:13, spir ☣ wrote: On Tue, 01 Jun 2010 15:00:47 +0100 Martin wrote: On 01/06/2010 11:23, spir ☣ wrote: What is the actual benefit of copy-on-write? I ask because of the following reasoning: * If a string is just used at several places, for example in output or into

Re: [fpc-pascal] Between bug?

2010-06-01 Thread Vinzent Höfler
Bee Jay : [TDateTime] > What if an app need a precise and correct result, say a rocket launcher? > :D Is there other alternative solution? Yes. Use a time type based on a fixed point representation. This eliminates drift and accuracy issues cause by a floating point representation. http://stop-

Re: [fpc-pascal] timing again

2010-06-01 Thread Vinzent Höfler
"spir ☣" : > Thank you. Using dos.getTime (including its last arg), the following > returns integer time in 10^-2s units: [...] > > This is the needed base for my uses. (A unit of 1s is too gross for > timing, this leads to endless runs; more precision than 10^-2s is > unneeded.) Actually, the r

Re: [fpc-pascal] PChar & AnsiString

2010-06-01 Thread spir
On Tue, 01 Jun 2010 16:30:22 +0100 Martin wrote: > I don't know all the internals of FPC, but yes to my understanding, your > quote: >"parameter passing is just an implicit assignment" > is absolutely true. > > So why do you then say "copy on write" would not apply? > The assignment creates

Re: [fpc-pascal] VirtualTreeview Mac (Carbon)

2010-06-01 Thread Luiz Americo Pereira Camara
CA Gorski escreveu: And if so, what is to do? Remove the dependencies on lclextensions from your port? Yes Ok, I will try... Meantime I tried to compile lclextensions against gtk2 What messages do you get when compile lclextensions for carbon? I ask that so i can add the missing functi

Re: [fpc-pascal] timing again

2010-06-01 Thread spir
On Tue, 01 Jun 2010 19:58:54 +0200 "Vinzent Höfler" wrote: > "spir ☣" : > > > Thank you. Using dos.getTime (including its last arg), the following > > returns integer time in 10^-2s units: > [...] > > > > This is the needed base for my uses. (A unit of 1s is too gross for > > timing, this leads

Re: [fpc-pascal] PChar & AnsiString

2010-06-01 Thread David Emerson
> > >> This is not correct. Many strings are simply referenced several > > >> times. > > > > > > May I ask in which typical cases? In an earlier version of our database (before we had things properly typed) many things were stored as strings. Thus a common ansistring may have had a reference

Re: [fpc-pascal] timing again

2010-06-01 Thread Paul Breneman
Thank you for this precision. Where does getTime actually get its time? And where do these numbers come from; I mean why chose this time unit instead of plain 1/10 or 1/100 or 1/1000s? (1193182 does not look familiar to my eyes ;-) Do you have an idea on how to get one of those time units (ms wo

Re: [fpc-pascal] timing again

2010-06-01 Thread Vinzent Höfler
> On Tue, 01 Jun 2010 19:58:54 +0200 > "Vinzent Höfler" wrote: > > > "spir ☣" : > > > > > Thank you. Using dos.getTime (including its last arg), the following > > > returns integer time in 10^-2s units: > > [...] > > > > > > This is the needed base for my uses. (A unit of 1s is too gross for >

Re: [fpc-pascal] timing again

2010-06-01 Thread Vinzent Höfler
> The standard clock for the system timer runs at 1,193,182 Hz, derived > for the original IBM PC as the 4.77 MHz processor clock divided by 4. Digging a bit deeper clarifies it: http://sos.enix.org/lxr/source/hwcore/i8254.c?v=6.5 |* Ahhh PC systems are nice toys: this maximum "strange" freque

Re: [fpc-pascal] timing again

2010-06-01 Thread Reimar Grabowski
> If you want to get better than that, you need to get system specific, I'm > afraid. That's not true. As Graeme already mentioned there is EpikTimer which is a cross-plattform, high-resolution timer (which btw works very well for realtime tasks). R. -- A: Because it messes up the order in w