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

Andrew Pennebaker andrew.pennebaker at gmail.com
Sat Oct 15 00:43:57 CEST 2011


Thanks ik. Merf, it appears fpc can't compile when a shebang is added. In
future versions, can fpc treat shebangs as comments so that instantfpc code
could be compiled like normal Free Pascal code?

$ cat hello.pas
#!/usr/bin/env instantfpc
program Hello;
begin
writeln('Hello World!')
end.

$ fpc hello.pas
Free Pascal Compiler version 2.4.4 [2011/05/01] for i386
Copyright (c) 1993-2010 by Florian Klaempfl
Target OS: Darwin for i386
Compiling hello.pas
hello.pas(1,1) Error: Illegal char constant
hello.pas(1,2) Fatal: Syntax error, "BEGIN" expected but "const string"
found
Fatal: Compilation aborted
Error: /usr/local/bin/ppc386 returned an error exitcode (normal if you did
not specify a source file to be compiled)

Cheers,

Andrew Pennebaker
www.yellosoft.us

On Fri, Oct 14, 2011 at 6:29 PM, ik <idokan at gmail.com> wrote:

>
> On Sat, Oct 15, 2011 at 00:25, Andrew Pennebaker <
> andrew.pennebaker at gmail.com> wrote:
>
>> E.g., if fpi existed, I would add a shebang like this to my code:
>>
>> #!/usr/bin/env fpi
>>
>>
> InstantFPC <http://wiki.freepascal.org/InstantFPC>
>
>
>> Cheers,
>>
>>
>> Andrew Pennebaker
>> www.yellosoft.us
>>
>> _______________________________________________
>> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>>
>
>
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20111014/afb84af9/attachment.html>


More information about the fpc-pascal mailing list