[fpc-pascal] Any command line interpreters for Free Pascal?
Andrew Pennebaker
andrew.pennebaker at gmail.com
Sat Oct 15 00:56:42 CEST 2011
Yeah, I know to chmod my scripts before dot-slashing them. It's just that
fpc can't handle shebangs, and I don't want to have to choose either
scripting or compiled. I like my Pascal code to be work in either mode.
Cheers,
Andrew Pennebaker
www.yellosoft.us
On Fri, Oct 14, 2011 at 6:49 PM, ik <idokan at gmail.com> wrote:
> On Sat, Oct 15, 2011 at 00:48, ik <idokan at gmail.com> wrote:
>
>> On Sat, Oct 15, 2011 at 00:43, Andrew Pennebaker <
>> andrew.pennebaker at gmail.com> wrote:
>>
>>> 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.
>>>
>>>
>> $ chmpd +x hello.pas
>>
>
> Opps,
> $ chmod +x hello.pas
>
>
>> $ ./hello.pas
>>
>>
>>
>>
>>> $ 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
>>>>
>>>
>>>
>>> _______________________________________________
>>> 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/fc63add5/attachment.html>
More information about the fpc-pascal
mailing list