Re: [fpc-pascal] loadlibrary() unsafe ?

2015-06-20 Thread fredvs
Hello. Sorry to come back with that story... ;-( I have used inside a script LD_LIBRARY_PATH` and at end runs the espeak executable. So a Tprocess run the script. Ok, it works but... now i do not have access to espeak anymore, not possible to cancel the speech. AProcess.terminate has impact on

Re: [fpc-pascal] For .. in .. loops with sets and valued enums

2015-06-20 Thread Michael Van Canneyt
On Fri, 19 Jun 2015, Torsten Bonde Christiansen wrote: Consider the following program: program Project1; type   TMyEnum = (     a = 1,     b = 3,     c = 5   );   TMySet = set of TMyEnum; var   Item: TMyEnum; begin   for Item in TMySet do     Writeln('Value = ', Integer(Item)); end.    

Re: [fpc-pascal] For .. in .. loops with sets and valued enums

2015-06-20 Thread Jonas Maebe
On 20/06/15 11:41, Michael Van Canneyt wrote: > But it is a bug that the compiler does not give an error for the set > type. Please report it. Should it work with any set types at all? (I don't mean set variables, but set types) Or even with any type? It seems very much like something that was acc

Re: [fpc-pascal] For .. in .. loops with sets and valued enums

2015-06-20 Thread Michael Van Canneyt
On Sat, 20 Jun 2015, Jonas Maebe wrote: On 20/06/15 11:41, Michael Van Canneyt wrote: But it is a bug that the compiler does not give an error for the set type. Please report it. Should it work with any set types at all? (I don't mean set variables, but set types) Or even with any type? It

Re: [fpc-pascal] For .. in .. loops with sets and valued enums

2015-06-20 Thread Jonas Maebe
On 20/06/15 12:01, Michael Van Canneyt wrote: > > > On Sat, 20 Jun 2015, Jonas Maebe wrote: > >> On 20/06/15 11:41, Michael Van Canneyt wrote: >>> But it is a bug that the compiler does not give an error for the set >>> type. Please report it. >> >> Should it work with any set types at all? (I d

Re: [fpc-pascal] For .. in .. loops with sets and valued enums

2015-06-20 Thread Adriaan van Os
Jonas Maebe wrote: Again: set *variables* or set *types*? Indeed. Think of var i: integer; for i in integer do which would be amusing. Regards, Adriaan van Os ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http:

Re: [fpc-pascal] loadlibrary() unsafe ?

2015-06-20 Thread Ewald
On 06/20/2015 09:05 AM, fredvs wrote: > Hello. > > Sorry to come back with that story... ;-( > > I have used inside a script LD_LIBRARY_PATH` and at end runs the espeak > executable. > > So a Tprocess run the script. Why use a script? When you exec(), a parameter is available to set the environment

Re: [fpc-pascal] For .. in .. loops with sets and valued enums

2015-06-20 Thread Michael Van Canneyt
On Sat, 20 Jun 2015, Jonas Maebe wrote: On 20/06/15 12:01, Michael Van Canneyt wrote: On Sat, 20 Jun 2015, Jonas Maebe wrote: On 20/06/15 11:41, Michael Van Canneyt wrote: But it is a bug that the compiler does not give an error for the set type. Please report it. Should it work with a

Re: [fpc-pascal] For .. in .. loops with sets and valued enums

2015-06-20 Thread Bernd Oppolzer
Maybe types should be forbidden at this place completely. Look at this: 1.) with subrg type - works ok !! program testin; type subrg = 1..10; var i: integer; begin for i in subrg do begin writeln (i) end end. 2.) with subrg type in in-expression - gives syntax error program tes

Re: [fpc-pascal] loadlibrary() unsafe ?

2015-06-20 Thread fredvs
@ Ewald => many thanks for your help. Your advices are very promising... I will test it and write later the result. Write you soon. Fre;D - Many thanks ;-) -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/loadlibrary-unsafe-tp5721801p5721865.html Sent fr

Re: [fpc-pascal] loadlibrary() unsafe ?

2015-06-20 Thread fredvs
Re_hello. Huh, i am loosed... Here the working script run by TProcess (but that cannot be canceled)=> #!/bin/sh LIBPORTAUDIO=libportaudio.so #portaudio library ESPEAKBIN=espeak #espeak binary CALLDIR=${0%/*}/# d

Re: [fpc-pascal] loadlibrary() unsafe ?

2015-06-20 Thread fredvs
Re-re-re-Hello. This one does not work too ;-( => - AProcess.Environment.Text := 'LD_PRELOAD=/home/fred/sak/sak/sakit/liblinux64/libportaudio.so' ; ??? Many thanks. Fre;D - Many thanks ;-) -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/loadlibrary-

Re: [fpc-pascal] loadlibrary() unsafe ?

2015-06-20 Thread Giuliano Colla
Il 20/06/2015 17:11, fredvs ha scritto: Re-re-re-Hello. This one does not work too ;-( => - AProcess.Environment.Text := 'LD_PRELOAD=/home/fred/sak/sak/sakit/liblinux64/libportaudio.so' ; ??? Many thanks. Have you tried: AProcess.Environment.Text := LD_LIBRARY_PATH=/home/fred/sak/sak/sakit/

Re: [fpc-pascal] loadlibrary() unsafe ?

2015-06-20 Thread fredvs
@ Giuliano => thanks for advice ;-) Hum, finally, using => AProcess.Environment.Text := 'LD_PRELOAD=/home/fred/sak/sak/sakit/liblinux64/libportaudio_x64.so' ; It works ;-) ( was a wrong character...) So, many, many thanks, i get the solution. Many thanks to everybody. Fre;D - Many t

Re: [fpc-pascal] loadlibrary() unsafe ?

2015-06-20 Thread waldo kitty
On 06/20/2015 11:11 AM, fredvs wrote: Re-re-re-Hello. This one does not work too ;-( => - AProcess.Environment.Text := 'LD_PRELOAD=/home/fred/sak/sak/sakit/liblinux64/libportaudio.so' ; how many "sak" are there really? you have two plus "sakit"... this is the first you've posted anything of

[fpc-pascal] PDF indexing

2015-06-20 Thread Marc Santhoff
Hi, does fpc (or lazarus) have a helper class for indexing the content of PDF files? I want to create a searchable full text index. TIA, Marc -- Marc Santhoff ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/c

Re: [fpc-pascal] PDF indexing

2015-06-20 Thread Michael Van Canneyt
On Sat, 20 Jun 2015, Marc Santhoff wrote: Hi, does fpc (or lazarus) have a helper class for indexing the content of PDF files? check packages/fpindexer I have used it to create full text searches on a database. You should be able to adapt the base code to create an index of a PDF. Micha

Re: [fpc-pascal] loadlibrary() unsafe ?

2015-06-20 Thread fredvs
@ Waldo => thanks for help. ;-) But TProcess.Environment kills the script... No script needed anymore ;-) The script will become a program.ini... => Works perfectly. TProcess.Environment.Text := 'LD_PRELOAD='/the/directory/of/thelibrary.so' ; => And now, canclel_speech (= TProcess.terminate)