Re: [fpc-pascal] DLL Linking

2005-06-21 Thread Steve Williams
L505 wrote: | Note that this is not allowed on Windows XP if your application is in | the Program Files directory. Applications are not allowed or should not | write to their application directory due to security restrictions. | | -- | Sly Really? So MS encourages you to write everything to the

Re: [fpc-pascal] DLL Linking

2005-06-21 Thread L505
| C:\Documents and Settings\\Application Data\\ | | Or sometimes, if the installer is set up for it: | | C:\Documents and Settings\All Users\Application Data\\ Yuck, and since there is no "documents and settings" directory on Linux, it's not a cross platform way of building apps. Of course, you'v

Re: [fpc-pascal] DLL Linking

2005-06-21 Thread Jeff Wormsley
L505 wrote: | Note that this is not allowed on Windows XP if your application is in | the Program Files directory. Applications are not allowed or should not | write to their application directory due to security restrictions. | | -- | Sly Really? So MS encourages you to write everything to th

Re: [fpc-pascal] DLL Linking

2005-06-21 Thread L505
| Note that this is not allowed on Windows XP if your application is in | the Program Files directory. Applications are not allowed or should not | write to their application directory due to security restrictions. | | -- | Sly Really? So MS encourages you to write everything to the main drive:\

Re: [fpc-pascal] string concatenation speed

2005-06-21 Thread Luiz Américo
Michael Van Canneyt wrote: Len:=0; For I:=X to Y do Inc(Len,Length(L[i])); // S string, L list. SetLength(S,Len); P:=1; For I:=X to Y do begin T:=L[i]; Len:=Length(T); Move(T[1],S[P],Len); inc(P,Len) end; This is the behavior you get using TStrings.Text

Re: [fpc-pascal] DLL Linking

2005-06-21 Thread Steve Williams
Pianoman wrote: Hi everyone, I have one question: Is it possible to link a Routine from DLL to my exe directly. Point is that I don't want distribute other files with the program and it would be nice to have only one executable nothing more. I use Bass audio library for playback and I

Re: [fpc-pascal] string concatenation speed

2005-06-21 Thread Marc Santhoff
Am Dienstag, den 21.06.2005, 21:19 +0200 schrieb Leonhard Holz: > Hi, Hi Leo, > > > > if (sl[4] <> '') then > > if ((sl[4][1] = '"') AND (sl[4][length(sl[4])] = '"')) > > then BaseColor := copy(sl[4],2,length(sl[4])-2) else > > BaseColor := > > sl[4]; > > You ca

Re: [fpc-pascal] string concatenation speed

2005-06-21 Thread Leonhard Holz
Hi, if (sl[4] <> '') then if ((sl[4][1] = '"') AND (sl[4][length(sl[4])] = '"')) then BaseColor := copy(sl[4],2,length(sl[4])-2) else BaseColor := sl[4]; You can tweak this a little by storing sl[4] and length(sl[4]) in local vars, but the whole appro

Re: [fpc-pascal] Suspending app

2005-06-21 Thread Michael Van Canneyt
On Tue, 21 Jun 2005, Darius Blaszijk wrote: > Hi, > > I have an app that checks several files continuously and when the fileage > has changed the app performs some instructions. I have put the checks in a > loop. The drawback is that the processor is now 100% loaded. I could use the > FindFirst

Re: [fpc-pascal] string concatenation speed

2005-06-21 Thread Marc Santhoff
Am Dienstag, den 21.06.2005, 19:46 +0200 schrieb Michael Van Canneyt: > > On Tue, 21 Jun 2005, Marc Santhoff wrote: > > > Hi, > > > > in an application of mine occurs a lot of string separation and > > re-concatenation. Since it is using masses of ANSI strings this is some > > performance proble

Re: [fpc-pascal] string concatenation speed

2005-06-21 Thread Marco van de Voort
> > So in general reserving buffer space and copying all string in and > finally setting the length would be the way to go here, if I understand > correctly. Yes, and avoid repeated use of stringlist[x]. First assign to a local var, then use for length() and normal use, as Michael already noted.

Re: [fpc-pascal] string concatenation speed

2005-06-21 Thread Marc Santhoff
Am Dienstag, den 21.06.2005, 19:21 +0200 schrieb Marco van de Voort: > > in an application of mine occurs a lot of string separation and > > re-concatenation. Since it is using masses of ANSI strings this is some > > performance problem. > > > > The strings get stored and loaded from TStringList'

Re: [fpc-pascal] Suspending app

2005-06-21 Thread SteveG
perhaps create a thread for your file checking code, and Sleep(xx) regularly to release the processor ? Darius Blaszijk wrote: Hi, I have an app that checks several files continuously and when the fileage has changed the app performs some instructions. I have put the checks in a loop. The draw

[fpc-pascal] Suspending app

2005-06-21 Thread Darius Blaszijk
Hi, I have an app that checks several files continuously and when the fileage has changed the app performs some instructions. I have put the checks in a loop. The drawback is that the processor is now 100% loaded. I could use the FindFirstChangeNotification API on windows. But is there a crossplat

Re: [fpc-pascal] string concatenation speed

2005-06-21 Thread Michael Van Canneyt
On Tue, 21 Jun 2005, Marc Santhoff wrote: > Hi, > > in an application of mine occurs a lot of string separation and > re-concatenation. Since it is using masses of ANSI strings this is some > performance problem. > > The strings get stored and loaded from TStringList's and concatenated > by s

Re: [fpc-pascal] string concatenation speed

2005-06-21 Thread Marco van de Voort
> in an application of mine occurs a lot of string separation and > re-concatenation. Since it is using masses of ANSI strings this is some > performance problem. > > The strings get stored and loaded from TStringList's and concatenated > by simply using '+' and separated with the function copy()

[fpc-pascal] string concatenation speed

2005-06-21 Thread Marc Santhoff
Hi, in an application of mine occurs a lot of string separation and re-concatenation. Since it is using masses of ANSI strings this is some performance problem. The strings get stored and loaded from TStringList's and concatenated by simply using '+' and separated with the function copy(). What

Re: [fpc-pascal] DLL Linking

2005-06-21 Thread Jonas Maebe
On 21 jun 2005, at 16:36, Pianoman wrote: Hi everyone, I have one question: Is it possible to link a Routine from DLL to my exe directly. Point is that I don't want distribute other files with the program and it would be nice to have only one executable nothing more. I use Bass a

[fpc-pascal] DLL Linking

2005-06-21 Thread Pianoman
Hi everyone, I have one question: Is it possible to link a Routine from DLL to my exe directly. Point is that I don't want distribute other files with the program and it would be nice to have only one executable nothing more. I use Bass audio library for playback and I am interested if

Re: [fpc-pascal] Small project $

2005-06-21 Thread L505
Are looking for an optimized way to display a full directory of log files onto a web page? - Original Message - From: "Paul Aviles" <[EMAIL PROTECTED]> To: Sent: Monday, June 20, 2005 7:56 PM Subject: [fpc-pascal] Small project $ | Basically a way to enable a web version of tail -f for

Re: [fpc-pascal] selecting target processor

2005-06-21 Thread Marc Santhoff
Am Montag, den 20.06.2005, 17:19 +0200 schrieb Eduardo: [...] > Are you using any dll or lib.so :? Perhaps the external code is compiled > for a specific processor. This in fact seems to be tha cause. The error happens inside the GTK library which i'll try to recompile and check again. Thanks to