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

2011-10-14 Thread Ralf A. Quint
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 compiled. I like my Pascal code to be work in either mode. Gosh, (Free)Pascal is a compil

[fpc-pascal] Problem passing pointers to "hidden" procedure

2011-10-14 Thread andrew.bennett
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 routine to be threaded, the program ceased to work. I append the es

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

2011-10-14 Thread Andrew Pennebaker
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 w

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

2011-10-14 Thread ik
On Sat, Oct 15, 2011 at 00:48, ik wrote: > On Sat, Oct 15, 2011 at 00:43, Andrew Pennebaker < > andrew.penneba...@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 >> coul

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

2011-10-14 Thread ik
On Sat, Oct 15, 2011 at 00:43, Andrew Pennebaker < andrew.penneba...@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? > > $

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

2011-10-14 Thread Andrew Pennebaker
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 h

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

2011-10-14 Thread ik
On Sat, Oct 15, 2011 at 00:25, Andrew Pennebaker < andrew.penneba...@gmail.com> wrote: > E.g., if fpi existed, I would add a shebang like this to my code: > > #!/usr/bin/env fpi > > InstantFPC > Cheers, > > > Andrew Pennebaker > www.yellosoft.us > > __

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

2011-10-14 Thread 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 ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] How do I load external Pascal code?

2011-10-14 Thread Andrew Pennebaker
Thanks Ager and Zhirov, the macros work! StackOverflow RosettaCode Cheers, Andrew Pennebaker www.yellosoft.us On Fri, Oct 14, 2011 at

Re: [fpc-pascal] How do I load external Pascal code?

2011-10-14 Thread Vladimir Zhirov
Andrew Pennebaker wrote: > Thanks, the conditional execution code helps a lot. Does > $IFDEF look for an environment or Makefile variable? No, it looks for previously defined variables. You can define variables using -dMyVar command line switch when running the compiler, or {$DEFINE MyVar} in sour

Re: [fpc-pascal] How do I load external Pascal code?

2011-10-14 Thread Andrew Pennebaker
Thanks, the conditional execution code helps a lot. Does $IFDEF look for an environment or Makefile variable? Cheers, Andrew Pennebaker www.yellosoft.us On Fri, Oct 14, 2011 at 1:06 AM, Søren Ager wrote: > On 2011-10-14 05:17, Andrew Pennebaker wrote: > > In some languages, especially scripti

Re: [fpc-pascal] More Filter Madness

2011-10-14 Thread Rich Saunders
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 stack size. So if your logic i

Re: [fpc-pascal] More Filter Madness

2011-10-14 Thread Nataraj S Narayan
Hi Many of us from south Asian countries in here ought to be in their middles ages! I am 45. Since many of us might have started out in our late twenties in Delphi, natural progression to be here in fpc in our autumn days of life. regards Nataraj On Fri, Oct 14, 2011 at 8:30 AM, Ko Hashiguchi

Re: [fpc-pascal] More Filter Madness

2011-10-14 Thread Ko Hashiguchi
Graeme, No apology necessary. I am 56 years old, I have to (because of lack of money) write my own utilities, and I am too old to take up programming as a profession. But I am NOT too old to program! I just need help every now and then. I am the same Ko Hashiguchi who asked for help with delimite

Re: [fpc-pascal] More Filter Madness

2011-10-14 Thread Graeme Geldenhuys
On 14/10/2011 09:09, Ko Hashiguchi wrote: > Call me an old fart who just needed the help. Please accept my apology then. Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ ___ fpc-p

Re: [fpc-pascal] More Filter Madness

2011-10-14 Thread Vincent Snijders
2011/10/14 Graeme Geldenhuys : > On 14/10/2011 08:49, Vincent Snijders wrote: >> >> Depending on how many numbers you read and the difference between >> > > The original poster's questions sounds very much like a homework > assignment, which you have no done for him. Naughty! The thought cros

Re: [fpc-pascal] More Filter Madness

2011-10-14 Thread Ko Hashiguchi
Hello Graeme, I'm way too old for homework, just to let you know. I'm five months younger than Steve Jobs and three months older than Bill Gates. Call me an old fart who just needed the help. Regards, Ko Hashiguchi On Fri, Oct 14, 2011 at 12:04 AM, Graeme Geldenhuys wrote: > On 14/10/2011 08:4

Re: [fpc-pascal] More Filter Madness

2011-10-14 Thread Graeme Geldenhuys
On 14/10/2011 08:49, Vincent Snijders wrote: > > Depending on how many numbers you read and the difference between > The original poster's questions sounds very much like a homework assignment, which you have no done for him. Naughty! Regards, - Graeme - -- fpGUI Toolkit - a cross-pla