Re: [fpc-pascal] Language constructs and types that dependent upon system unit

2017-01-21 Thread Lars
Forgot to mention, you can also write your own system unit and swap it in place (in delphi and fpc). You can modify existing system unit or even rewrite your own system unit from scratch.. KOL/mck project does this sort of thing to decrease executable size to a miniature size. Embedded programme

Re: [fpc-pascal] FPC run (run program after compile)

2017-01-21 Thread Lars
On Mon, January 16, 2017 1:21 pm, Lars wrote: .. > On Mon, January 16, 2017 3:59 am, Sven Barth wrote: >> No, FPC is a compiler, not a "runner" or debugger. That would even be >> one of the few points where patches would *not* be welcome. >> > > fpcrun.exe is an alternative to "fpc run" > > fpcrun.

Re: [fpc-pascal] Array as result in function.

2017-01-21 Thread fredvs
And this one ? op_read: function(OpusFile: TOggOpusFile; pcm : pcint; SampleCount: Integer; li: pcint): Integer; op_read_float: function(OpusFile: TOggOpusFile; pcm : pcfloat; SampleCount: Integer; li: pcint): Integer; op_read_stereo: function(OpusFile: TOggOpusFile; pcm : pcint; SampleCount: Inte

Re: [fpc-pascal] Array as result in function.

2017-01-21 Thread silvioprog
On Sat, Jan 21, 2017 at 11:11 AM, fredvs wrote: > Hello everybody. > > Do you agree with this ? : > > type > TOggOpusFile = ^OggOpusFile; > OggOpusFile = record > end; > > op_read: function(OpusFile: TOggOpusFile; pcm : pcfloat; SampleCount: > Integer; li: pointer): Integer; > It's almost

Re: [fpc-pascal] Array as result in function.

2017-01-21 Thread fredvs
Hello everybody. Do you agree with this ? : type TOggOpusFile = ^OggOpusFile; OggOpusFile = record end; op_read: function(OpusFile: TOggOpusFile; pcm : pcfloat; SampleCount: Integer; li: pointer): Integer; op_read_float: function(OpusFile: TOggOpusFile; pcm : pcfloat; SampleCount: Integer;

Re: [fpc-pascal] Array as result in function.

2017-01-21 Thread Vojtěch Čihák
Hi,   that's why portaudio.pp declares types like this:   PaStream = Pointer; PPaStream = ^PaStream; PPPaStream = ^PPaStream;   V. __ Od: Sven Barth Komu: fpc-pascal@lists.freepascal.org Datum: 21.01.2017 12:29 Předmět: Re: [fpc-pascal]

Re: [fpc-pascal] Array as result in function.

2017-01-21 Thread fredvs
@ Silvio > Try two tests: >$ echo -e '#include \nint main(){printf("size of float: %zu\\n", sizeof(float));return 0;}' > fredvs.c && gcc -o fredvs fredvs.c && clear && ./fredvs # it prints "size > of float: 4" on your terminal ==> size of float: 4 > $ echo "program fredvs;begin writeln('sizeof

Re: [fpc-pascal] Array as result in function.

2017-01-21 Thread Sven Barth
On 20.01.2017 23:36, fredvs wrote: > Re-hello. > > Ok, thanks Silvio, I will take this one from your advice, it works like > charm: > > type > TOggOpusFile = THandle; > TDArFloat = array of cfloat; > PDArFloat = ^TDArFloat; > > op_read: function(OpusFile: TOggOpusFile; pcm : PDArFloat; Sam