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

Roland Schäfer roland.schaefer at fu-berlin.de
Sat Oct 15 09:56:27 CEST 2011


On 10/15/2011 9:10 AM, Roland Schäfer wrote:
> Good look,

I meant "luck", of course.

> Roland
> 
> On 10/15/2011 12:56 AM, Andrew Pennebaker wrote:
>> 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20111015/ac54ab2a/attachment.sig>


More information about the fpc-pascal mailing list