Re: Re[4]: [fpc-pascal] Text scan in text files - (was: Full text scan - PDF files)

2010-11-02 Thread Marcos Douglas
On Tue, Nov 2, 2010 at 8:32 PM, DaWorm wrote: > > > On Tue, Nov 2, 2010 at 11:45 AM, Marcos Douglas wrote: >> >> If I found a match, I need to know which page the >> token was found... >> > > That may prove most difficult, since I doubt your pdf to text will preserve > that very well. Yeah... th

[fpc-pascal] How I can associate a text file name in UTF8?

2010-11-02 Thread Luis Fernando Del Aguila Mejía
How I can associate a text file name in UTF8? Example: Assign (F, 'タスク 01.txt'); Assign (F, 'Задание 01.txt'); Assign (F, '♕ Queen.txt'); thanks ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fp

[fpc-pascal] TReader.ReadProperty

2010-11-02 Thread Fred Flinestone
hi all, i am trying to replace the code from delphi to fpc where the code looks like: TYPE THackReader =class(TReader); ... FReaderStream.Position := 0; {$IFDEF FPC} try FReader.ReadListBegin; while not FReader.EndOfList do begin THackReader(FReader).ReadProperty

[fpc-pascal] Re: Endian issues when porting FPC programs from x86 to other platforms

2010-11-02 Thread Bo Berglund
On Tue, 02 Nov 2010 22:53:21 +0100, Vinzent Höfler wrote: >On Tue, 02 Nov 2010 21:39:31 +0100, Felipe Monteiro de Carvalho > wrote: > >> On Tue, Nov 2, 2010 at 7:04 PM, Bo Berglund >> wrote: >>> Thanks, that helps a lot! Are there also overloaded BEtoN functions >>> for floating point values

Re: Re[4]: [fpc-pascal] Text scan in text files - (was: Full text scan - PDF files)

2010-11-02 Thread DaWorm
On Tue, Nov 2, 2010 at 11:45 AM, Marcos Douglas wrote: > If I found a match, I need to know which page the > token was found... > > That may prove most difficult, since I doubt your pdf to text will preserve that very well. Jeff. ___ fpc-pascal maillis

Re: [fpc-pascal] Re: Endian issues when porting FPC programs from x86 to other platforms

2010-11-02 Thread Jonas Maebe
On 02 Nov 2010, at 21:39, Felipe Monteiro de Carvalho wrote: > On Tue, Nov 2, 2010 at 7:04 PM, Bo Berglund wrote: >> Thanks, that helps a lot! Are there also overloaded BEtoN functions >> for floating point values? > > I think that single and double have always the same binary layout. That's i

Re: [fpc-pascal] Re: Endian issues when porting FPC programs from x86 to other platforms

2010-11-02 Thread Vinzent Höfler
On Tue, 02 Nov 2010 21:39:31 +0100, Felipe Monteiro de Carvalho wrote: On Tue, Nov 2, 2010 at 7:04 PM, Bo Berglund wrote: Thanks, that helps a lot! Are there also overloaded BEtoN functions for floating point values? I think that single and double have always the same binary layout. Mo

Re: [fpc-pascal] Re: Endian issues when porting FPC programs from x86 to other platforms

2010-11-02 Thread Felipe Monteiro de Carvalho
On Tue, Nov 2, 2010 at 7:04 PM, Bo Berglund wrote: > Thanks, that helps a lot! Are there also overloaded BEtoN functions > for floating point values? I think that single and double have always the same binary layout. -- Felipe Monteiro de Carvalho ___

[fpc-pascal] Re: Endian issues when porting FPC programs from x86 to other platforms

2010-11-02 Thread Bo Berglund
On Tue, 02 Nov 2010 09:32:36 +0100, Thomas Schatzl wrote: >Hi, > >> Or maybe this is a moot question if FPC is only so far running on >> platforms that have the same endian as x86 CPU:s? I have no >> information on this though... >> >> I can see at least these targets: >> - Windows and Linux on

Re: Re[4]: [fpc-pascal] Text scan in text files - (was: Full text scan - PDF files)

2010-11-02 Thread Marcos Douglas
On Tue, Nov 2, 2010 at 11:38 AM, José Mejuto wrote: > Hello FPC-Pascal, > > Tuesday, November 2, 2010, 11:02:18 AM, you wrote: > > TH> If I understand it correctly, this assumes reading the whole file into > TH> memory at once. Depending on the size of that file and other conditions, > TH> this ma

Re: [fpc-pascal] MSEide+MSEgui rev.2.4

2010-11-02 Thread Brian Winfrey
> > The fixes_2_4 is already at version 2.4.3 and contains everything from > 2.4.2 and more... > Thank you. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re[4]: [fpc-pascal] Text scan in text files - (was: Full text scan - PDF files)

2010-11-02 Thread José Mejuto
Hello FPC-Pascal, Tuesday, November 2, 2010, 11:02:18 AM, you wrote: TH> If I understand it correctly, this assumes reading the whole file into TH> memory at once. Depending on the size of that file and other conditions, TH> this may or may not be advisable... Yes, and a pdf2text conversion will

Re: [fpc-pascal] Re: Endian issues when porting FPC programs from x86 to other platforms

2010-11-02 Thread Jonas Maebe
On 02 Nov 2010, at 12:41, Bo Berglund wrote: > The end to me is the last (the right-most) byte. And that is the LSB. > So the end is LSB, the little part... "Little endian" means "the little end comes first" (with "the little end" referring to the least significant byte). See http://en.wikiped

[fpc-pascal] Re: Endian issues when porting FPC programs from x86 to other platforms

2010-11-02 Thread Bo Berglund
On Tue, 02 Nov 2010 09:09:05 +0100, Bo Berglund wrote: OK, I see that there are functions to convert a known BE or LE integer value to the *native* order. This would in principle work across all platforms where FPC is implemented so that is good news! However now I have the semantics to deal wit

Re: [fpc-pascal] Endian issues when porting FPC programs from x86 to other platforms

2010-11-02 Thread Mark Morgan Lloyd
Thomas Schatzl wrote: Hi, Or maybe this is a moot question if FPC is only so far running on platforms that have the same endian as x86 CPU:s? I have no information on this though... I can see at least these targets: - Windows and Linux on x86 CPU:s - Embedded Linux on ARM CPU:s Sparc, PowerP

Re: Re[2]: [fpc-pascal] Text scan in text files - (was: Full text scan - PDF files)

2010-11-02 Thread Tomas Hajny
On Mon, November 1, 2010 21:52, José Mejuto wrote: . . > So if you are looking for ASCII words, use PDF2Text and use the POS > function over the result: > > function HaveString(Filename: String; TheString: string): Boolean; > var > F: TFileStream; > S: String; > AtPos: integer; > begin >

Re: [fpc-pascal] Endian issues when porting FPC programs from x86 to other platforms

2010-11-02 Thread Thomas Schatzl
Hi, > Or maybe this is a moot question if FPC is only so far running on > platforms that have the same endian as x86 CPU:s? I have no > information on this though... > > I can see at least these targets: > - Windows and Linux on x86 CPU:s > - Embedded Linux on ARM CPU:s Sparc, PowerPC are big en

Re: [fpc-pascal] Endian issues when porting FPC programs from x86 to other platforms

2010-11-02 Thread Marco van de Voort
In our previous episode, Bo Berglund said: > Now, however, the problem may be complicated because the program may > well run on a CPU that is using the *same* endian structure as the > original instrument in which case of course the swaps should not be > done. Correct. > So I need some detector o

[fpc-pascal] Endian issues when porting FPC programs from x86 to other platforms

2010-11-02 Thread Bo Berglund
I am writing a serial communications program, which will connect to a data acquisition instrument and download data. I am using FPC/Lazarus in order to make the program platform independent so it can be deployed also on an embedded Linux system even though it is developed on Windows or Ubuntu on an