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

2011-10-15 Thread Roland Schäfer
I get the impression that you want to use Pascal for something it wasn't designed for. Even if you can find some kind of solution, it will probably be a bad hack. But that question is probably for fpc-other. So anyway, the only solution I can think of is to automatically comment out the shebang

RE : [fpc-pascal] Problem passing pointers to hidden procedure

2011-10-15 Thread Ludo Brands
When the routine being passed as a parameter is in the top level of the unit, PrPublic, all is well; the expected pointers are passed. When an identical routine PrPrivate is hidden inside the top level routine Test_it, the expected 2nd pointer appears in place of the first and an

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

2011-10-15 Thread Roland Schäfer
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

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

2011-10-15 Thread Tomas Hajny
On Sat, October 15, 2011 00:43, Andrew Pennebaker 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? . . While I agree with others

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

2011-10-15 Thread Marco van de Voort
In our previous episode, Andrew Pennebaker said: 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? I'm not sure that went into 2.4.4 at the same

Re: [fpc-pascal] More Filter Madness

2011-10-15 Thread Jürgen Hestermann
Rich Saunders schrieb: On 10/14/11 2:39 AM, Nataraj S Narayan wrote: Good candidate for recursive algorithm i think. At first glance maybe, but it is actually a horrible candidate. That is due to the fact that the number of values is unknown and recursion has a built-in limit based on the

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

2011-10-15 Thread Michael Van Canneyt
On Fri, 14 Oct 2011, 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. It's always compiled.

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

2011-10-15 Thread Marco van de Voort
In our previous episode, Michael Van Canneyt said: 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. It's always

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

2011-10-15 Thread MihaiR
On Sat, 15 Oct 2011 00:29:28 +0200 ik wrote: InstantFPC http://wiki.freepascal.org/InstantFPC Now, you realy made my day :)) I am using FPC and Lazarus for very nice things almost every day and I love it. I missed something like InstantFPC. Congratulations!!! Please keep up the good work guys.

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

2011-10-15 Thread Florian Klämpfl
Am 15.10.2011 12:10, schrieb Marco van de Voort: In our previous episode, Michael Van Canneyt said: 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

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

2011-10-15 Thread Andrew Pennebaker
Good idea, van de Voort. Can someone confirm that fpc plays nicely with shebangs in a version after 2.4.4? And Schäfer, I respect Pascal for being a compiled language. I myself and fond of Haskell. But Haskell has a scripted mode, and instantfpc, like all good interpreters, compiles code in the

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

2011-10-15 Thread Marco van de Voort
In our previous episode, Andrew Pennebaker said: Good idea, van de Voort. Can someone confirm that fpc plays nicely with shebangs in a version after 2.4.4? I just tried, and it doesn't. I assume that it was talked about and got stuck in my mind, but it never really was implemented. And

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

2011-10-15 Thread Jonas Maebe
On 15 Oct 2011, at 17:24, Andrew Pennebaker wrote: Good idea, van de Voort. Can someone confirm that fpc plays nicely with shebangs in a version after 2.4.4? It doesn't. Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

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

2011-10-15 Thread Andrew Pennebaker
Hestermann: Indeed, compiled programs will always run faster than interpreted programs. The value in scripting is that an interpreted environment allows coders to rapidly go through write code / test code loops. Interpreters let you explore your own codebase, like gdb but far more powerful.

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

2011-10-15 Thread Jürgen Hestermann
Andrew Pennebaker schrieb: Adding shebangs to fpc wouldn't kill Pascal or compiled programming. Of course not. It just binds man power to something useless (IMO). It would welcome scripting programmers into the Pascal community, and let Pascal programmers write and test code more quickly.

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

2011-10-15 Thread Mattias Gaertner
Ralf A. Quint free...@gmx.net hat am 15. Oktober 2011 um 05:03 geschrieben: At 03:56 PM 10/14/2011, 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

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

2011-10-15 Thread Mattias Gaertner
Tomas Hajny xhaj...@hajny.biz hat am 15. Oktober 2011 um 10:19 geschrieben: On Sat, October 15, 2011 00:43, Andrew Pennebaker 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

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

2011-10-15 Thread Ralf A. Quint
At 09:30 AM 10/15/2011, Andrew Pennebaker wrote: Indeed, compiled programs will always run faster than interpreted programs. The value in scripting is that an interpreted environment allows coders to rapidly go through write code / test code loops. Interpreters let you explore your own

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

2011-10-15 Thread Florian Klämpfl
Am 15.10.2011 19:21, schrieb Ralf A. Quint: At 09:30 AM 10/15/2011, Andrew Pennebaker wrote: Indeed, compiled programs will always run faster than interpreted programs. The value in scripting is that an interpreted environment allows coders to rapidly go through write code / test code loops.

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

2011-10-15 Thread Mattias Gaertner
Ralf A. Quint free...@gmx.net hat am 15. Oktober 2011 um 19:15 geschrieben: At 10:00 AM 10/15/2011, Mattias Gaertner wrote: Ralf A. Quint free...@gmx.net hat am 15. Oktober 2011 um 05:03 geschrieben: At 03:56 PM 10/14/2011, Andrew Pennebaker wrote: Yeah, I know to chmod my scripts

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

2011-10-15 Thread Andrew Pennebaker
How do you write scripts? With a text editor? Then you don't have a debugger at hand, no syntax highlighting, etc. And this lets you write code quick? Not for me. There may be a language barrier here. When I say text editor, I mean something like vi, Emacs, TextMate, Eclipse. Syntax highlighting

Re: [fpc-pascal] More Filter Madness

2011-10-15 Thread Alberto Narduzzi
Good candidate for recursive algorithm i think. At first glance maybe, but it is actually a horrible candidate. IMHO, this is far from being a problem that needs to be solved with recursion. Indeed, you don't need recursion at all: you have a file, and just need to sum its values till

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

2011-10-15 Thread Sven Barth
On 15.10.2011 19:56, Andrew Pennebaker wrote: Yes, software bloat is to be avoided. In the simplest terms, I'm asking for fpc to consider shebangs as comments. That little syntactical addition wouldn't bloat fpc by much at all, but it would allow the same code to be compiled by fans of fpc, and

Re: [fpc-pascal] Problem passing pointers to hidden procedure

2011-10-15 Thread Sven Barth
On 15.10.2011 01:01, andrew.benn...@ns.sympatico.ca wrote: As part of an attempt at multi-threading, I have had to move many things that used to be global into the Implementation parts of units in order to enforce privacy. When I moved a routine passed as a parameter and put it inside the

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

2011-10-15 Thread Tomas Hajny
On Sat, October 15, 2011 19:56, Andrew Pennebaker wrote: . . No debugger at hand? An interpreter *is* a debugger. No, not with InstantFPC (even if I should consider InstantFPC an interpreter which it isn't). Interpreters don't provide real debugging support (stepping through the code line by

RE : [fpc-pascal] Problem passing pointers to hidden procedure

2011-10-15 Thread andrew.bennett
On Sat, 15 Oct 2011 09:24:36 +0200 Ludo Brands ludo.bra...@free.fr wrote On Fri, 14 Oct 2011 20:01:47 -0300 andrew.benn...@ns.sympatico.ca wrote When the routine being passed as a parameter is in the top level of the unit, PrPublic, all is well; the expected pointers are passed. When an

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

2011-10-15 Thread Andrew Pennebaker
Barth: Yes, there is a distinction to be made between an interpreted environment, say, GHCi, and instantfpc, which is simply a compiler wrapper just advanced enough to let you ./ your Pascal programs. With a little more work, instantfpc could become an interpreted environment. I'll see if I can

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

2011-10-15 Thread Alex Shishkin
15.10.2011 2:25, Andrew Pennebaker пишет: E.g., if fpi existed, I would add a shebang like this to my code: #!/usr/bin/env fpi Cheers, Andrew Pennebaker www.yellosoft.us http://www.yellosoft.us ___ fpc-pascal maillist -