Re: [fpc-pascal]runtime 201 with swapword function

2003-07-25 Thread James Mills
On Fri, Jul 25, 2003 at 04:36:39PM +0100, Matt Emson wrote: > > > Doesn't system contain a routine called 'swap' that does this exact thing?? > > This program would seem to work in both Delphi and FPC1.1: > > program test; > {$APPTYPE CONSOLE} > > uses > sysutils; > > var > i, j: word; >

Re: [fpc-pascal]How to use Linux libraries?

2003-07-25 Thread James Mills
On Fri, Jul 25, 2003 at 06:18:48PM +0200, Rainer Hantsch wrote: > Hello, James! > > On Sat, 26 Jul 2003, James Mills wrote: > | I could write you up a set of such procedures or classes to do this, > | however I'm starting back at uni. New semester :) > > Good success at Uni! What are you studying

Re: [fpc-pascal]How to use Linux libraries?

2003-07-25 Thread Micha? Kamburelis
Hi Rainer Pasjpeg is basically just a Pascal translation of sources originally written in ANSI C by IJG, Independent JPEG Group. You can find this C code with documentation at http://www.ijg.org/. At these URL there are also some informations about JPEG file coding (actually JFIF, JPEG is a st

Re: [fpc-pascal]How to use Linux libraries?

2003-07-25 Thread Rainer Hantsch
Hello, James! On Sat, 26 Jul 2003, James Mills wrote: | I could write you up a set of such procedures or classes to do this, | however I'm starting back at uni. New semester :) Good success at Uni! What are you studying? | Anyway, I'm sure there are others here on this mailing list that could |

Re: [fpc-pascal]The state of FPC - wrap up

2003-07-25 Thread Marco van de Voort
> Just for adding my few cents : I'm not keen on FPC , and rather know a > little about FPC design but I think this is academical disscuss becouse > Pascal never used preprocessor like C++ and becouse of that was so fast, but > also so complicated when using it in multiplatform envinronment. > Loo

Re: [fpc-pascal]runtime 201 with swapword function

2003-07-25 Thread Matt Emson
Doesn't system contain a routine called 'swap' that does this exact thing?? This program would seem to work in both Delphi and FPC1.1: program test; {$APPTYPE CONSOLE} uses sysutils; var i, j: word; begin i := $9988; writeln( IntToHex(i, 4) ); //output '9988' j := swap( i ); writ

Re: [fpc-pascal]The state of FPC - wrap up

2003-07-25 Thread Boguslaw Brandys
Hello, Just for adding my few cents : I'm not keen on FPC , and rather know a little about FPC design but I think this is academical disscuss becouse Pascal never used preprocessor like C++ and becouse of that was so fast, but also so complicated when using it in multiplatform envinronment. Look

Re: [fpc-pascal]runtime 201 with swapword function

2003-07-25 Thread Michael Van Canneyt
On Sat, 26 Jul 2003, James Mills wrote: > Hi, > > Why does the following result in a runtime error ? > > program example; > > const > THE_PORT = ; > > function swapWord(w: Word): Word; > begin > swapWord := (w SHL 8) OR (w SHR 8); > end; > > var > port: Word; > begin >

Re: [fpc-pascal]runtime 201 with swapword function

2003-07-25 Thread James Mills
On Fri, Jul 25, 2003 at 04:30:35PM +0200, Florian Klaempfl wrote: > James Mills wrote: > >On Fri, Jul 25, 2003 at 04:21:36PM +0200, Jonas Maebe wrote: > > > >>On vrijdag, jul 25, 2003, at 16:22 Europe/Brussels, James Mills wrote: > >> > >> > >>>Why does the following result in a runtime error ? > >

Re: [fpc-pascal]runtime 201 with swapword function

2003-07-25 Thread Marco van de Voort
> On Fri, Jul 25, 2003 at 04:21:36PM +0200, Jonas Maebe wrote: > > > > On vrijdag, jul 25, 2003, at 16:22 Europe/Brussels, James Mills wrote: > > > > >Why does the following result in a runtime error ? > > > > > >program example; > > > > > >const > > > THE_PORT = ; > > > > > >function swapW

Re: [fpc-pascal]runtime 201 with swapword function

2003-07-25 Thread James Mills
On Fri, Jul 25, 2003 at 04:30:24PM +0200, Jonas Maebe wrote: > > On vrijdag, jul 25, 2003, at 16:32 Europe/Brussels, James Mills wrote: > > >>In Pascal, all calculations are performed using the base type (which > >>is > >>longint in FPC), so if w > 255, then w shl 8 > high(word) and will > >>res

Re: [fpc-pascal]runtime 201 with swapword function

2003-07-25 Thread Florian Klaempfl
James Mills wrote: On Fri, Jul 25, 2003 at 04:21:36PM +0200, Jonas Maebe wrote: On vrijdag, jul 25, 2003, at 16:22 Europe/Brussels, James Mills wrote: Why does the following result in a runtime error ? program example; const THE_PORT = ; function swapWord(w: Word): Word; begin

Re: [fpc-pascal]runtime 201 with swapword function

2003-07-25 Thread Nikolay Nikolov
[EMAIL PROTECTED] wrote: Why does the following result in a runtime error ? program example; const THE_PORT = ; function swapWord(w: Word): Word; begin swapWord := (w SHL 8) OR (w SHR 8); end; How can I correct this ? This bit of code was taken directly from server.pp in one of the old 2002

Re: [fpc-pascal]runtime 201 with swapword function

2003-07-25 Thread Jonas Maebe
On vrijdag, jul 25, 2003, at 16:32 Europe/Brussels, James Mills wrote: In Pascal, all calculations are performed using the base type (which is longint in FPC), so if w > 255, then w shl 8 > high(word) and will result in a range check error when assigning to swapWord. Even if we calculated everyth

Re: [fpc-pascal]runtime 201 with swapword function

2003-07-25 Thread Jonas Maebe
On vrijdag, jul 25, 2003, at 16:22 Europe/Brussels, James Mills wrote: Why does the following result in a runtime error ? program example; const THE_PORT = ; function swapWord(w: Word): Word; begin swapWord := (w SHL 8) OR (w SHR 8); end; In Pascal, all calculations are perfo

Re: [fpc-pascal]runtime 201 with swapword function

2003-07-25 Thread James Mills
On Fri, Jul 25, 2003 at 04:21:36PM +0200, Jonas Maebe wrote: > > On vrijdag, jul 25, 2003, at 16:22 Europe/Brussels, James Mills wrote: > > >Why does the following result in a runtime error ? > > > >program example; > > > >const > > THE_PORT = ; > > > >function swapWord(w: Word): Word; >

Re: [fpc-pascal]How to use Linux libraries?

2003-07-25 Thread James Mills
On Fri, Jul 25, 2003 at 04:04:47PM +0200, Rainer Hantsch wrote: > On Fri, 25 Jul 2003, Michael Van Canneyt wrote: > | It uses some windows bitmap structures, and cannot be compiled on Linux as > | is. For the rest it compiles 100% fine. You could cut&paste the needed > | definitions from the window

[fpc-pascal]runtime 201 with swapword function

2003-07-25 Thread James Mills
Hi, Why does the following result in a runtime error ? program example; const THE_PORT = ; function swapWord(w: Word): Word; begin swapWord := (w SHL 8) OR (w SHR 8); end; var port: Word; begin port := swapWord(THE_PORT) end. $ ./swapword Runtime error 2

Re: [fpc-pascal]How to use Linux libraries?

2003-07-25 Thread Rainer Hantsch
On Fri, 25 Jul 2003, Michael Van Canneyt wrote: | It uses some windows bitmap structures, and cannot be compiled on Linux as | is. For the rest it compiles 100% fine. You could cut&paste the needed | definitions from the windows unit and put them between {$ifndef | win32}..{$endif} So, in fact, th

Re: [fpc-pascal]XChat plugins using FPC

2003-07-25 Thread James Mills
On Thu, Jul 24, 2003 at 11:17:53AM +0200, Michael Van Canneyt wrote: > > > On Thu, 24 Jul 2003, James Mills wrote: > > > On Wed, Jul 23, 2003 at 08:50:35AM +0200, Michael Van Canneyt wrote: > > > > > > > > > On Wed, 23 Jul 2003, James Mills wrote: > > > > > > > On Wed, Jul 23, 2003 at 03:28:55AM

Re: [fpc-pascal]A suggestion.

2003-07-25 Thread Jonas Maebe
On vrijdag, jul 25, 2003, at 14:17 Europe/Brussels, A.J. Venter wrote: No sense reinventing the wheel, except for one tiny downside - we have no access to the ide sources. Sure you do, checkout the module "ide" from cvs. The problem with the IDE is that you can't build the version we distribute,

Re: [fpc-pascal]A suggestion.

2003-07-25 Thread A.J. Venter
Trouble is, that is the only feature I miss ! Everything else about the borland IDE is downright annoying in it's primitiveness. Had this not been the case, I would have been using the fp ide anyway. I use vim myself. Hence my thought of a separate proggie that can do this. The easy way here woul

Re: [fpc-pascal]A suggestion.

2003-07-25 Thread James Mills
On Fri, Jul 25, 2003 at 10:33:19AM +0200, Jonas Maebe wrote: > > On vrijdag, jul 25, 2003, at 08:30 Europe/Brussels, A.J. Venter wrote: > > >I miss being able to put the cursor on a function/procedure/reserved > >word name and hitting F1 to see the help section for it. > > The text mode IDE alre

Re: [fpc-pascal]XChat plugins using FPC

2003-07-25 Thread James Mills
On Fri, Jul 25, 2003 at 01:04:14PM +0200, Holger Peters wrote: > Hi, > > if you are successful, I would be glad to receive the ported Header > files and a small example. rofl! :) Make me do all the hard work :( This is the first time I've converted any c headers of any sort... I'm getting close

Re: [fpc-pascal]The state of FPC - wrap up

2003-07-25 Thread Michael Van Canneyt
On Fri, 25 Jul 2003, Matt Emson wrote: > > If someone contributes a tool which does the necessary preprocessing > > i.e. including needed files, then I will set up a system where the > > source files are 'assembled' into single-source units for a given > > platform/cpu combination. These single-

Re: [fpc-pascal]XChat plugins using FPC

2003-07-25 Thread Holger Peters
Hi, if you are successful, I would be glad to receive the ported Header files and a small example. Holger James Mills schrieb: Hi, I can successully compile and test the plugin source listed at http://xchat.org/docs/plugin20.html written in C. However I don't like C much and am wondering if i

Re: [fpc-pascal]The state of FPC - wrap up

2003-07-25 Thread Marco van de Voort
[ Charset ISO-8859-1 unsupported, converting... ] > > If someone contributes a tool which does the necessary preprocessing > > i.e. including needed files, then I will set up a system where the > > source files are 'assembled' into single-source units for a given > > platform/cpu combination. These

Re: [fpc-pascal]The state of FPC - wrap up

2003-07-25 Thread Matt Emson
> If someone contributes a tool which does the necessary preprocessing > i.e. including needed files, then I will set up a system where the > source files are 'assembled' into single-source units for a given > platform/cpu combination. These single-source units can be distributed > with each platfo

Re: [fpc-pascal]The state of FPC - wrap up

2003-07-25 Thread Michael Van Canneyt
On Fri, 25 Jul 2003, Florian Klaempfl wrote: > Michael Van Canneyt wrote: > > Hello, > > > > I think the point about users finding include files cumbersome to use, > > and developers who require maintainability, has been made clear. > > > > We can discuss about this for ages, and never agree. So

Re: [fpc-pascal]The state of FPC - wrap up

2003-07-25 Thread Florian Klaempfl
Michael Van Canneyt wrote: Hello, I think the point about users finding include files cumbersome to use, and developers who require maintainability, has been made clear. We can discuss about this for ages, and never agree. So I would like to conclude the discussion with a proposal. My proposal is

Re: [fpc-pascal]MMSYSTEM problem...

2003-07-25 Thread L D Blake
In reply to your message of July 25, 2003 > Here are the complete instructions on how you can obtain the unit that > you want: Thanks. The reason I wanted this was that it's got the direct-play MCI function in it. MCIWndCreate lets you hand MCI a filename and it will play anything mci can hand

Re: [fpc-pascal]A suggestion.

2003-07-25 Thread Jonas Maebe
On vrijdag, jul 25, 2003, at 08:30 Europe/Brussels, A.J. Venter wrote: I miss being able to put the cursor on a function/procedure/reserved word name and hitting F1 to see the help section for it. The text mode IDE already has support for this (using the html documentation). Jonas _

Re: [fpc-pascal]How to use Linux libraries?

2003-07-25 Thread Michael Van Canneyt
On Fri, 25 Jul 2003, Rainer Hantsch wrote: > Hi, Marco! > > On Thu, 24 Jul 2003, Marco van de Voort wrote: > | Howrever the site is still up: > | > | http://www.nomssi.de/pasjpeg/pasjpeg.html > > I know this site, and I know 'pasjpeg' from its name. I tried multiple times > to get it working, bu

[fpc-pascal]The state of FPC - wrap up

2003-07-25 Thread Michael Van Canneyt
Hello, I think the point about users finding include files cumbersome to use, and developers who require maintainability, has been made clear. We can discuss about this for ages, and never agree. So I would like to conclude the discussion with a proposal. My proposal is as follows: If someone

Re: [fpc-pascal]How to use Linux libraries?

2003-07-25 Thread Rainer Hantsch
Hi, Marco! On Thu, 24 Jul 2003, Marco van de Voort wrote: | Howrever the site is still up: | | http://www.nomssi.de/pasjpeg/pasjpeg.html I know this site, and I know 'pasjpeg' from its name. I tried multiple times to get it working, but I always had the same problems, it does not compile. In the