[fpc-pascal] Freepascal 2.2.0 released

Marc Santhoff M.Santhoff at t-online.de
Tue Sep 11 16:57:29 CEST 2007


Am Dienstag, den 11.09.2007, 15:17 +0200 schrieb Joost van der Sluis:
> Op dinsdag 11-09-2007 om 14:47 uur [tijdzone +0200], schreef Marc
> Santhoff:
> > Am Montag, den 10.09.2007, 12:56 +0200 schrieb Joost van der Sluis:
> > 
> > Since this page isn't already up:
> > 
> > >  http://wiki.freepascal.org/User_Changes_2.2.0
> > 
> > Can someone please give a short explanation of this item?:
> > 
> > >   * pointer[low..high] syntax to pass C-style pointer arrays to procedures
> > >     using open arrays
> 
> var s:string;
> 
> begin
>   s := 'hello world';
>   writeln(s[6,11]);
> end;
> 
> Returns 'world'. But s[6,15] will give trouble! This way you can pass a
> subset of a dynamic array (string).

I'll surely test it later on, but one more question is important:

I read "C-style" as syntactically similar but not necessarily really
comaptible to C. Would that work when handing over pascal array data to
a dynamic library written in C?

I had some hard times regarding dimension order in memory and to make
sure the data is stored consecutively when feeding integer and
single/double arrays to a .so made in C.

Thanks so far,
Marc





More information about the fpc-pascal mailing list