Re: [fpc-pascal] Does ReallocMem(p,0) always set p to nil?

2007-05-07 Thread Vincent Snijders
Vincent Snijders schreef: Hi, Consider this piece of code: var p: pointer; begin p := getmem(100); reallocmem(p,0); p := nil; end. Do I need to do p:=nil, if I want to be sure that p contains nil? I saw that both system.SysReAllocMem and cmem.CReAllocMem do this, is size=0, but the

Re: [fpc-pascal] set output directory for resources

2007-05-07 Thread Vincent Snijders
Peter Vreman schreef: Vincent Snijders schreef: Hi, If I compile a unit which contains {$R wincemenures.res} a file named wincemenures.or is created in the source directory, even if I have set -FU or -FE. What parameter do I need to pass to the compile to move the .or file to the unit output

Re: [fpc-pascal] Does ReallocMem(p,0) always set p to nil?

2007-05-07 Thread Michael Van Canneyt
On Mon, 7 May 2007, Vincent Snijders wrote: Vincent Snijders schreef: Hi, Consider this piece of code: var p: pointer; begin p := getmem(100); reallocmem(p,0); p := nil; end. Do I need to do p:=nil, if I want to be sure that p contains nil? I saw that

[fpc-pascal] libsndfile library

2007-05-07 Thread Tiziano_mk
The real question is How to play a sound file on Linux in the same way I can do it on windows?. this is my experience: On Windows I do: uses mmsystem ... sndPlaySound('filename.wav',0); ... and it works gracefully. On Linux I found only the sndfile unit (packages\extra\sndfile\). This

Re: [fpc-pascal] Does ReallocMem(p,0) always set p to nil?

2007-05-07 Thread Vincent Snijders
Michael Van Canneyt schreef: On Mon, 7 May 2007, Vincent Snijders wrote: Vincent Snijders schreef: Hi, Consider this piece of code: var p: pointer; begin p := getmem(100); reallocmem(p,0); p := nil; end. Do I need to do p:=nil, if I want to be sure that p contains nil? I saw that

Re: [fpc-pascal] libsndfile library

2007-05-07 Thread Marco van de Voort
On Linux I found only the sndfile unit (packages\extra\sndfile\). This require the presence of sndlife library on the distribution. In my PC I have Ubuntu 6.06 with libsndfile installed (dynamic library only): /usr/lib/libsndfile.so.1.0.12 /usr/lib/libsndfile.so.1 Your Linux system

Re: [fpc-pascal] set output directory for resources

2007-05-07 Thread Graeme Geldenhuys
On 5/7/07, Vincent Snijders [EMAIL PROTECTED] wrote: Committed in r7276. Can it be merged to the fixes branch? That would be great... -- Graeme Geldenhuys There's no place like S34° 03.168' E018° 49.342' ___ fpc-pascal maillist -

Re: [fpc-pascal] libsndfile library

2007-05-07 Thread Tiziano_mk
Marco van de Voort wrote: On Linux I found only the sndfile unit (packages\extra\sndfile\). This require the presence of sndlife library on the distribution. In my PC I have Ubuntu 6.06 with libsndfile installed (dynamic library only): /usr/lib/libsndfile.so.1.0.12 /usr/lib/libsndfile.so.1

[fpc-pascal] LongWord

2007-05-07 Thread Carsten Bager
I have written a small demo program that gives a runetime error when it runs. Is it the compiler or is it me? Regards carsten The program program word32test; {$RANGECHECKS ON} {$OVERFLOWCHECKS ON} {$S+ STACK CHECKING ON}

Re: [fpc-pascal] LongWord

2007-05-07 Thread Jonas Maebe
On 7 mei 2007, at 14:15, Carsten Bager wrote: I have written a small demo program that gives a runetime error when it runs. Is it the compiler or is it me? See http://www.freepascal.org/mantis/view.php?id=8321 for a long discussion on this topic. Jonas

Re: [fpc-pascal] LongWord

2007-05-07 Thread Daniël Mantione
Op Mon, 7 May 2007, schreef Jonas Maebe: On 7 mei 2007, at 14:15, Carsten Bager wrote: I have written a small demo program that gives a runetime error when it runs. Is it the compiler or is it me? See http://www.freepascal.org/mantis/view.php?id=8321 for a long discussion on this

Re: [fpc-pascal] LongWord

2007-05-07 Thread Carsten Bager
I have written a small demo program that gives a runetime error See http://www.freepascal.org/mantis/view.php?id=8321 for a long discussion on this topic. I do not think that the discussion covers my case, all my numbers are positive and the result is positive. I have just tried the example

Re: [fpc-pascal] LongWord

2007-05-07 Thread Bernd Mueller
Jonas, On 7 mei 2007, at 14:15, Carsten Bager wrote: I have written a small demo program that gives a runetime error when it runs. Is it the compiler or is it me? See http://www.freepascal.org/mantis/view.php?id=8321 for a long discussion on this topic. I think I have hit a similar case

Re: [fpc-pascal] libsndfile library

2007-05-07 Thread bartek
A -lxxx searches for libxxx.so only, not for variants. Create symlinks if necessary or try to install packages that might create symlinks (like -dev packages on RedHat) Ubuntu also has x-dev packages. apt-get install lbsndfile1-dev should fix your problem without need to tinker. Ok, I'll

Re: [fpc-pascal] libsndfile library

2007-05-07 Thread Marco van de Voort
/usr/lib/libsndfile.so.1.0.12 /usr/lib/libsndfile.so.1 Your Linux system is not properly configured for libsndfile development. neither for other kind of develpment libraries (ncurses, sqlite, etc, etc) indeed. Each time I try something that needs a link to a library I have to

[fpc-pascal] Widestrings length and character iteration

2007-05-07 Thread Christos Chryssochoidis
Hi, Are there any rtl functions to compute the length (in characters) of a widestring and to iterate over its characters? In my system (Mac OS X/fpc 2.1.3), a widestring is implemented as a UTF-8 encoded string, as I found out. Thanks ___

Re: [fpc-pascal] Widestrings length and character iteration

2007-05-07 Thread Daniël Mantione
Op Mon, 7 May 2007, schreef Christos Chryssochoidis: Hi, Are there any rtl functions to compute the length (in characters) of a widestring and to iterate over its characters? If you treat it as UCS-2: length(widestring_variable) In my system (Mac OS X/fpc 2.1.3), a widestring is

Re: [fpc-pascal] LongWord

2007-05-07 Thread Jonas Maebe
On 7 mei 2007, at 15:14, Bernd Mueller wrote: See http://www.freepascal.org/mantis/view.php?id=8321 for a long discussion on this topic. I think I have hit a similar case with the following code: {$mode objfpc}{$H+} program test; { FPC 2.0.4} var w: Word; begin w:= ; if lo(w)

Re: [fpc-pascal] libsndfile library

2007-05-07 Thread Marc Santhoff
Am Montag, den 07.05.2007, 10:01 +0200 schrieb Tiziano_mk: Marco van de Voort wrote: On Linux I found only the sndfile unit (packages\extra\sndfile\). This require the presence of sndlife library on the distribution. In my PC I have Ubuntu 6.06 with libsndfile installed (dynamic library

RV: [fpc-pascal] Program exited with code 01

2007-05-07 Thread josepascual (almudi)
Any suggestion? -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre de josepascual (almudi) Enviado el: viernes, 04 de mayo de 2007 10:28 Para: 'FPC-Pascal users discussions' Asunto: [fpc-pascal] Program exited with code 01 Hi Everyone, I have compiled

Re: RV: [fpc-pascal] Program exited with code 01

2007-05-07 Thread Henry Vermaak
On 07/05/07, josepascual (almudi) [EMAIL PROTECTED] wrote: $ ./hello_eabi_arm -bash: ./ hello_eabi_arm: No such file or directory ... ... ... (gdb) run Starting program: /tmp/hello_eabi_arm /bin/bash: /tmp/hello_eabi_arm: No such file or directory so the file doesn't exist. did it not

[fpc-pascal] Class Memory Table Size

2007-05-07 Thread Andrew Haines
Hi, In this page http://www.freepascal.org/docs-html/prog/progsu139.html#x189-1950008.2.13 in the VMT +0 is the Size of object type data and the same number in the negative is stored at +4. How important is it that this number is not changed after the object is created? I want to store a number