Re: [fpc-pascal] InstantFPC and argv

2012-05-07 Thread Tomas Hajny
On Mon, May 7, 2012 12:21, Mattias Gaertner wrote: On Sat, 5 May 2012 15:04:05 +0200 (CEST) Tomas Hajny xhaj...@hajny.biz wrote: On Sat, May 5, 2012 14:13, Mattias Gaertner wrote: . . ExecuteProcess is only a simple utility function. All posix platforms can start a process with another

Re: [fpc-pascal] InstantFPC and argv

2012-05-07 Thread Mattias Gaertner
On Mon, 7 May 2012 13:34:50 +0200 (CEST) Tomas Hajny xhaj...@hajny.biz wrote: On Mon, May 7, 2012 12:21, Mattias Gaertner wrote: On Sat, 5 May 2012 15:04:05 +0200 (CEST) Tomas Hajny xhaj...@hajny.biz wrote: [...] The implementation for unix is only a few lines. I guess for winxx and os/2

Re: [fpc-pascal] InstantFPC and argv

2012-05-07 Thread Marco van de Voort
In our previous episode, Mattias Gaertner said: It's not big. The RTL lacks little functions for scripts. For example download an URL, get a list of files in a directory, load a xml file, test a RE. Running pascal programs as scripts is only the first step. The next step is to provide a

Re: [fpc-pascal] InstantFPC and argv

2012-05-07 Thread Tomas Hajny
On Mon, May 7, 2012 14:26, Mattias Gaertner wrote: On Mon, 7 May 2012 13:34:50 +0200 (CEST) Tomas Hajny xhaj...@hajny.biz wrote: 54 lines for WinXX, 144 for OS/2 and 278 for GO32v2 (all without the additional platform specific implementation for changing the passed environment). Where do got

Re: [fpc-pascal] InstantFPC and argv

2012-05-05 Thread Tomas Hajny
On Fri, May 4, 2012 21:58, Marco van de Voort wrote: In our previous episode, Tomas Hajny said: 1) Find the first alphabetic character after the first line (which is already processed/skipped by InstantFPC anyway) while ignoring all whitespaces and possible comments (in all allowed formats,

Re: [fpc-pascal] InstantFPC and argv

2012-05-05 Thread Mattias Gaertner
On Sat, 5 May 2012 14:07:01 +0200 (CEST) Tomas Hajny xhaj...@hajny.biz wrote: On Fri, May 4, 2012 21:58, Marco van de Voort wrote: In our previous episode, Tomas Hajny said: 1) Find the first alphabetic character after the first line (which is already processed/skipped by InstantFPC

Re: [fpc-pascal] InstantFPC and argv

2012-05-05 Thread Mattias Gaertner
On Sat, 5 May 2012 14:08:26 +0200 Jonas Maebe jonas.ma...@elis.ugent.be wrote: On 05 May 2012, at 14:02, Tomas Hajny wrote: My proposal is platform independent (i.e. it will work also under Win32, OS/2, etc., without any changes). Your proposal probably requires starting the compiled

Re: [fpc-pascal] InstantFPC and argv

2012-05-05 Thread Tomas Hajny
On Sat, May 5, 2012 14:13, Mattias Gaertner wrote: On Sat, 5 May 2012 14:02:12 +0200 (CEST) Tomas Hajny xhaj...@hajny.biz wrote: On Sat, May 5, 2012 09:22, Michael Van Canneyt wrote: On Fri, 4 May 2012, Mattias Gaertner wrote: On Fri, 04 May 2012 17:22:16 +0200 dhkblas...@zeelandnet.nl

Re: [fpc-pascal] InstantFPC and argv

2012-05-05 Thread Tomas Hajny
On Sat, May 5, 2012 14:08, Jonas Maebe wrote: On 05 May 2012, at 14:02, Tomas Hajny wrote: My proposal is platform independent (i.e. it will work also under Win32, OS/2, etc., without any changes). Your proposal probably requires starting the compiled binary using platform specific API

Re: [fpc-pascal] InstantFPC and argv

2012-05-05 Thread Tomas Hajny
On 5 May 12, at 14:20, Mattias Gaertner wrote: On Sat, 5 May 2012 14:07:01 +0200 (CEST) Tomas Hajny xhaj...@hajny.biz wrote: On Fri, May 4, 2012 21:58, Marco van de Voort wrote: In our previous episode, Tomas Hajny said: 1) Find the first alphabetic character after the first line

Re: [fpc-pascal] InstantFPC and argv

2012-05-05 Thread Jonas Maebe
On 05 May 2012, at 14:25, Mattias Gaertner wrote: It uses only the file name, not the path to distinguish. Having two scripts with the same name recompiles every time you switch. This does mean that if a script is moved, the stored script location as seen by the compiled binary will not

Re: [fpc-pascal] InstantFPC and argv

2012-05-04 Thread michael . vancanneyt
On Fri, 4 May 2012, dhkblas...@zeelandnet.nl wrote: I'm creating a script to be executed by instantfpc when I noticed that paramstr(0) does not reflect the location of the script but the location of the cached executable. Is there a way to alter this location programatically to the script

Re: [fpc-pascal] InstantFPC and argv

2012-05-04 Thread michael . vancanneyt
On Fri, 4 May 2012, michael.vancann...@wisa.be wrote: On Fri, 4 May 2012, dhkblas...@zeelandnet.nl wrote: I'm creating a script to be executed by instantfpc when I noticed that paramstr(0) does not reflect the location of the script but the location of the cached executable. Is there a

Re: [fpc-pascal] InstantFPC and argv

2012-05-04 Thread dhkblaszyk
On 4 mei '12, michael.vancann...@wisa.be wrote: On Fri, 4 May 2012, michael.vancann...@wisa.be [3]wrote: On Fri, 4 May 2012, dhkblas...@zeelandnet.nl [1]wrote: I'm creating a script to be executed by instantfpc when I noticed that paramstr(0) does not reflect the location of the

Re: [fpc-pascal] InstantFPC and argv

2012-05-04 Thread Tomas Hajny
On Fri, May 4, 2012 17:44, dhkblas...@zeelandnet.nl wrote: On 4 mei '12, michael.vancann...@wisa.be wrote: On Fri, 4 May 2012, michael.vancann...@wisa.be [3]wrote: On Fri, 4 May 2012, dhkblas...@zeelandnet.nl [1]wrote: I'm creating a script to be executed by instantfpc when I noticed that

Re: [fpc-pascal] InstantFPC and argv

2012-05-04 Thread Darius Blaszyk
On May 4, 2012, at 6:12 PM, Tomas Hajny wrote: On Fri, May 4, 2012 17:44, dhkblas...@zeelandnet.nl wrote: On 4 mei '12, michael.vancann...@wisa.be wrote: On Fri, 4 May 2012, michael.vancann...@wisa.be [3]wrote: On Fri, 4 May 2012, dhkblas...@zeelandnet.nl [1]wrote: I'm creating a

Re: [fpc-pascal] InstantFPC and argv

2012-05-04 Thread Tomas Hajny
On Fri, May 4, 2012 18:44, Darius Blaszyk wrote: On May 4, 2012, at 6:12 PM, Tomas Hajny wrote: On Fri, May 4, 2012 17:44, dhkblas...@zeelandnet.nl wrote: On 4 mei '12, michael.vancann...@wisa.be wrote: On Fri, 4 May 2012, michael.vancann...@wisa.be [3]wrote: On Fri, 4 May 2012,

Re: [fpc-pascal] InstantFPC and argv

2012-05-04 Thread Marco van de Voort
In our previous episode, Tomas Hajny said: 1) Find the first alphabetic character after the first line (which is already processed/skipped by InstantFPC anyway) while ignoring all whitespaces and possible comments (in all allowed formats, i.e. including (* *) ) - the only small complexity here

Re: [fpc-pascal] InstantFPC and argv

2012-05-04 Thread Mattias Gaertner
On Fri, 04 May 2012 17:22:16 +0200 dhkblas...@zeelandnet.nl wrote: I'm creating a script to be executed by instantfpc when I noticed that paramstr(0) does not reflect the location of the script but the location of the cached executable. Is there a way to alter this location