[fpc-pascal] Any command line interpreters for Free Pascal?

Mattias Gaertner nc-gaertnma at netcologne.de
Sun Oct 16 20:28:25 CEST 2011





Andrew Pennebaker <andrew.pennebaker at gmail.com> hat am 16. Oktober 2011 um 19:53
geschrieben:


> There are plenty who do believe it's convenient to hide compilation in the
> background--the users of instantfpc. Syntax for shebangs in fpc would bridge
> instantfpc and traditional Pascal code. You would no longer have to treat
> instantfpc code as a special case, because fpc wouldn't mind the shebangs.
The great feature of instantfpc is that it combines two steps: compiling and
runnning. The other great feature is that it uses a cache directory, so that the
source directory does not get polluted by ppu and executables and that it starts
scripts faster than php, bash etc. This way you get the speed of a compiled
program combined with the ease of use of a script.
If you add the ability to fpc to ignore the shebang line, you are still missing
the important features of instantfpc.
In other words: As long as you don't add the other abilities to fpc too, you
still need instantfpc.
 
 
 


> 
> 
> It's the same for case statements and if statements. If you really prefer if
> statements for everything, you can write everything with if statements. But
> for those who recognize the convenience of case statements, it's nice to have
> case statements.
> 
> Adding shebangs would not change the nature of Pascal. It's first and foremost
> a compiled, highly optimized language. Shebangs would allow Pascal to better
> fill the Unix scripting niche.
 
Normally a shebang script does not create files - it can run in a readonly
directory.
 
 


> 
> 
> 
> [...]
> $ fpc hello.pas
> 
> hello.pas(1,1) Error: Illegal char constant
> hello.pas(1,2) Fatal: Syntax error, "BEGIN" expected but "const string" found
 
To compile use:
instantfpc --skip-run -B hello.pas
 
If you don't like typing so much, define an alias for your shell.
alias ifp='instantfpc --skip-run -B' 
 
Mattias
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20111016/717da4c3/attachment.html>


More information about the fpc-pascal mailing list