[fpc-pascal] run pascal programs as scripts

Ludo Brands ludo.brands at free.fr
Sat Apr 23 20:27:37 CEST 2011


Nice tool. 

2 requests:
- I would like to select the compiler. I'm typically working with the svn
version of compiler but have in my PATH a stable version of the compiler.
>From the sources I can see that the compiler is searched for only in the
PATH. A simple solution would be to look first for the compiler in the path
specified in the shebang and, if not found, then in the PATH. 
- I was going to ask for the possibility of passing parameters to the
program. Scripts without the possiblity to pass parameters are not really
usefull. And we do't want to put parameters in the program neither since it
would be re-compiled everytime the parameters change. Looking at the source
I figured out that the compiler parameters stop at the first parameter not
starting with a "-" and passes the rest on to the program. Great,needs to be
added to the documentation, but... The cache is compared to the complete
script, including the shebang. So if a program parameter is changed, the
program is re-compiled... The shebang is commented out but program
parameters should  be removed before compare. Recompiling if compiler
parameters change is OK. 

Ludo 



-----Message d'origine-----
De : fpc-pascal-bounces at lists.freepascal.org
[mailto:fpc-pascal-bounces at lists.freepascal.org] De la part de Mattias
Gaertner
Envoyé : samedi 23 avril 2011 19:33
À : fpc-pascal at lists.freepascal.org
Objet : Re: [fpc-pascal] run pascal programs as scripts


On Sun, 27 Mar 2011 19:05:12 +0200 (CEST)
Michael Van Canneyt <michael at freepascal.org> wrote:

> 
> 
> On Sun, 27 Mar 2011, Mattias Gaertner wrote:
> 
> > I wrote a little tool:
> >
> > http://wiki.lazarus.freepascal.org/InstantFPC
> 
> Nice job. OK to include in FPC as one of the utils ?

Are there any outstanding issues?

Mattias
_______________________________________________
fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal




More information about the fpc-pascal mailing list