Re: [fpc-pascal] run pascal programs as scripts

2011-04-25 Thread Darius Blaszyk
On Apr 23, 2011, at 7:33 PM, Mattias Gaertner wrote: > On Sun, 27 Mar 2011 19:05:12 +0200 (CEST) > Michael Van Canneyt wrote: > >> >> >> On Sun, 27 Mar 2011, Mattias Gaertner wrote: >> >>> I wrote a little tool: >>> >>> http://wiki.lazarus.freepascal.org/InstantFPC >> >> Nice job. OK to in

Re: [fpc-pascal] run pascal programs as scripts

2011-04-25 Thread Marco van de Voort
Instantfpc seems to work fine under FreeBSD/32-bit too. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] A few doubts about C to pascal header translations:

2011-04-25 Thread Marco van de Voort
In our previous episode, Paulo Costa said: > >> I replaced size_t by PtrUInt, is there a better alternative? > > > > On *nix size_t is afaik declared in unit baseunix? > > > > Right now I'm working in Linux but I latter would like to make it work > in Windows. The main concern was if it was 32/64

Re: [fpc-pascal] A few doubts about C to pascal header translations:

2011-04-25 Thread Paulo Costa
On 24/04/2011 16:41, Marco van de Voort wrote: In our previous episode, Paulo Costa said: I've come across some constructs that I'm not sure how to translate: A procedure where one of the arguments is declared as: size_t arg; also a macro where appears: sizeof(size_t) I replaced size_t by Ptr

Re: [fpc-pascal] More doubts on C to pascal header translations:

2011-04-25 Thread Paulo Costa
On 25/04/2011 08:58, Marco van de Voort wrote: In our previous episode, Paulo Costa said: I saw that h2pas translated: typedef void(*callback)(int pos, void* userdata); to callback = procedure (pos:cint; var userdata:pointer);cdecl; userdata is essentially untyped, so it doesn't matter what

RE : [fpc-pascal] run pascal programs as scripts

2011-04-25 Thread Ludo Brands
> I added the option --compiler=. It's already in the fpc version of instantfpc. Great, thanks. Ludo -Message d'origine- De : fpc-pascal-boun...@lists.freepascal.org [mailto:fpc-pascal-boun...@lists.freepascal.org] De la part de Mattias Gaertner Envoyé : lundi 25 avril 2011 11:34 À : fpc

Re: [fpc-pascal] run pascal programs as scripts

2011-04-25 Thread Mattias Gaertner
On Mon, 25 Apr 2011 10:24:58 +0200 "Ludo Brands" wrote: > > One solution: > > PATH=YourDirectory:$PATH; script.pas > > I prefer to keep the PATH intact. I'll use: > bash -c "PATH=YourDirectory:$PATH; script.pas" That's the same. To change the PATH you must use export PATH= in bash. > > Anoth

RE : [fpc-pascal] run pascal programs as scripts

2011-04-25 Thread Ludo Brands
> One solution: > PATH=YourDirectory:$PATH; script.pas I prefer to keep the PATH intact. I'll use: bash -c "PATH=YourDirectory:$PATH; script.pas" > Another solution: > A parameter could be added to instantfpc to specify the compiler. Would be the most elegant solution. I understand the "search i

Re: [fpc-pascal] More doubts on C to pascal header translations:

2011-04-25 Thread Marco van de Voort
In our previous episode, Paulo Costa said: > I saw that h2pas translated: > > typedef void(*callback)(int pos, void* userdata); > > to > > callback = procedure (pos:cint; var userdata:pointer);cdecl; userdata is essentially untyped, so it doesn't matter what it exactly points too. > shouldn't