[fpc-pascal] FPC 2.2 article made it onto OSNews.com
Nicely done Joost! http://www4.osnews.com/story/18592/Cross-Platform_Development_with_Free_Pascal_2.2.0 ... or a shorter link: http://tinyurl.com/ywzyvr Regards, - Graeme - ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Freepascal 2.2.0 released
Joost van der Sluis wrote: The Free Pascal Compiler team is pleased to announce the release of FPC 2.2.0! Congratulations and thank you very much. Regards, Bernd. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Pascals unit for associate arrays?
> Is there any unit, or built in functionality, to do the equivalent of > perl's associate arrays or Python's dictionaries? > > > What I am trying todo is to parse some lines and to store ocurrences of > certain strings. > > For example > string1 > string2 > string1 > string3 > string2 > > What I want to do is to create an entry string1 and count all string1 one > ocurrences, the same for each different string. In the end I would have > string1 2 > string2 2 > string3 1 Have a look at Decal in contribs svn. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Freepascal 2.2.0 released
Am Montag, den 10.09.2007, 12:56 +0200 schrieb Joost van der Sluis: > The Free Pascal Compiler team is pleased to announce the release of FPC > 2.2.0! Many thanks to all people making this happen! Although I'm not an every day user of fpc and lazarus it's a great gift to have such mature tools for writing in a language leaving the hair on my head (in contrast to many others letting it fade to grey or fall out). ;) > ** > What's New in 2.2.0 > ** That's by far the most impressing feature list I've seen for a long time. Especially the rich set of CPU and OS targets is pretty cool! Marc ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Freepascal 2.2.0 released
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 TIA, Marc ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Freepascal 2.2.0 released
Op Tue, 11 Sep 2007, 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 If you allocate dynamic sized structures using pointers it was previously troublesome to pass this to open arrays, i.e. you can now do: procedure abc(const x:array of byte); begin end; var b:Pbyte; begin abc(b[0..7]); end; However, it also works with normal arrays (and strings) you you can now pass partial arrays: procedure abc(const x:array of byte); begin end; var b:array[0..15] of byte; begin abc(b[0..9]); end; Daniël___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Freepascal 2.2.0 released
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). Joost. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Fwd: [fpc-devel] Re: [fpc-pascal] Freepascal 2.2.0 released
Sent to wrong mailing list (web mail ...) - Doorgestuurd bericht van [EMAIL PROTECTED] - Datum: Tue, 11 Sep 2007 16:18:03 +0200 Van: Jonas Maebe <[EMAIL PROTECTED]> Antwoorden aan:FPC developers' list <[EMAIL PROTECTED]> Onderwerp: [fpc-devel] Re: [fpc-pascal] Freepascal 2.2.0 released Aan: [EMAIL PROTECTED] Marc Santhoff wrote on di, 11 sep 2007: 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 Note that the page above does not explain that. It only explains gotchas you may run into when compiling code which compiled/worked with the previous release of FPC, but which may now no longer compile or behave differently. New features should be described in the documentation (although I have no idea what to search for if you want a description of the above). The page is above is a wiki page so it can be easily updated in case other issues are discovered, so it can be easily updated. Jonas This message was sent using IMP, the Internet Messaging Program. ___ fpc-devel maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-devel - Einde doorgestuurd bericht - This message was sent using IMP, the Internet Messaging Program. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Freepascal 2.2.0 released
Am Dienstag, den 11.09.2007, 15:13 +0200 schrieb Daniël Mantione: > > 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 > > If you allocate dynamic sized structures using pointers it was previously > troublesome to pass this to open arrays, i.e. you can now do: > > procedure abc(const x:array of byte); > > begin > end; > > var b:Pbyte; > > begin > abc(b[0..7]); > end; > > However, it also works with normal arrays (and strings) you you can now > pass partial arrays: > > procedure abc(const x:array of byte); > > begin > end; > > var b:array[0..15] of byte; > > begin > abc(b[0..9]); > end; I see, pretty neat for handling array row-wise or the like, thanks. Marc ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Freepascal 2.2.0 released
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 ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Freepascal 2.2.0 released
Hi! > > procedure abc(const x:array of byte); > > > > begin > > end; > > > > var b:array[0..15] of byte; > > > > begin > > abc(b[0..9]); > > end; > > I see, pretty neat for handling array row-wise or the like, thanks. Is it also possible to run abc(b[2..9]); i.e. using a start-index different from 0? Bye Hansi ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Freepascal 2.2.0 released
Op Tue, 11 Sep 2007, schreef Johann Glaser: > Hi! > > > > procedure abc(const x:array of byte); > > > > > > begin > > > end; > > > > > > var b:array[0..15] of byte; > > > > > > begin > > > abc(b[0..9]); > > > end; > > > > I see, pretty neat for handling array row-wise or the like, thanks. > > Is it also possible to run > abc(b[2..9]); > i.e. using a start-index different from 0? Yes, you can. Daniël___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] handing over array of pchars to C program
Am Montag, den 03.09.2007, 09:31 +0200 schrieb Marco van de Voort: > > has anyone managed to build in a pascal program what in C is a > > > > char *strings[] > > > > and use it from C? > > Same as char**strings so ppchar. The missing link. :) > > In pascal terms this is a single dimensional array aka vector of PChar. > > > > Do I have to make copies of any string or is it sufficient to fill up an > > array with PChar? > > That depends on what you do with it, like under C, where you can also let it > point to e.g. constants using & > > > My attemtps all failed up to know ... > > Have a look at the unixutil unit (most notably stringtoppchar) and the unix > unit > implementation (exec procedures that use environment mostly) > > Note that the unixutil unit was meant only as a temporary helper for unix, > and not really meant to be used by endusers. The "leftovers" of the > linux->unix unit transform are stored there. But at least it is a nice source of information for learning how to handle some cases. Thanks, Marc ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] FPC 2.2.0 for DOS
Can someone tell me what needs to be done to have FPC 2.2.0 for DOS? Regards, Andreas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC 2.2.0 for DOS
Op Tue, 11 Sep 2007, schreef Andreas Berger: > Can someone tell me what needs to be done to have FPC 2.2.0 for DOS? Well, this time it is in good state, for a change. A release needs to be build and tested to work and install correctly. Daniël___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC 2.2.0 for DOS
Daniël Mantione wrote: Can someone tell me what needs to be done to have FPC 2.2.0 for DOS? Well, this time it is in good state, for a change. A release needs to be build and tested to work and install correctly. Is this in the works? If not how do I compile (and especially test) the release? Jim Hall of the FreeDOS project would like to include it in the package. Regards, Andreas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC 2.2.0 for DOS
Op Tue, 11 Sep 2007, schreef Andreas Berger: > Daniël Mantione wrote: > > > > > Can someone tell me what needs to be done to have FPC 2.2.0 for DOS? > > > > > > > Well, this time it is in good state, for a change. A release needs to be > > build and tested to work and install correctly. > > > Is this in the works? I think Pierre would be the best person to build it, however, he seems inactive again, allthough you can send him an e-mail. > If not how do I compile (and especially test) the > release? Jim Hall of the FreeDOS project would like to include it in the > package. Please read the "Release engineering" page on the Wiki. You need to export /tags/release_2_2_0 from the svnbuild repository, copy the documentation and libgdb into it then execute "make go32v2zip". If everything goes well you get an installation program. That has to be tested, i.e. wether it installs correctly, basic programs can be compiled, etc. Daniël ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal