Re: [fpc-pascal] Currency and ABS(-674.59)

2012-03-09 Thread Sven Barth
Am 08.03.2012 13:14, schrieb Marcos Douglas: So, if you have two values to storage (amount of decimals is 4) e.g. 100.34524 and 2,000.2 you do: 100.34524 = 1003452 2,000.2 = 20002000 I never heard about this technique before. Very good! The buzzword for this is Fixed Point Arithmetic. See

[fpc-pascal] Re: xterm -e program-compiled-with-fpc2.4.0 doesn't work

2012-03-09 Thread max
You seem to know your way around, Bernd, don't you! Well, I've tried xterm -hold -e /my/program : the xterm-window pops up and stays with nothing in it at all: no error and no program output [which should be there]: seems to me that the program isn't being run at all! That is if it is compiled

Re: [fpc-pascal] Currency and ABS(-674.59)

2012-03-09 Thread Jonas Maebe
On 09 Mar 2012, at 10:23, Sven Barth wrote: The buzzword for this is Fixed Point Arithmetic. See here: http://en.wikipedia.org/wiki/Fixed-point_arithmetic And in principle, it's exactly what currency should use. And in fact, it is what it does use in FPC on platforms that don't support an

Re: [fpc-pascal] Re: xterm -e program-compiled-with-fpc2.4.0 doesn't work

2012-03-09 Thread Jonas Maebe
On 09 Mar 2012, at 10:24, max wrote: My general wish for the compiler programmer would be that old versions would still be available and installable in the future as new versions sometimes show strange behaviours on old prorgams They generally remain available. However, versions prior to

Re: [fpc-pascal] Re: xterm -e program-compiled-with-fpc2.4.0 doesn't work

2012-03-09 Thread Sven Barth
Am 09.03.2012 10:24, schrieb max: You seem to know your way around, Bernd, don't you! Well, I've tried xterm -hold -e /my/program : the xterm-window pops up and stays with nothing in it at all: no error and no program output [which should be there]: seems to me that the program isn't being run

[fpc-pascal] fpWeb: Error when trying to call a module without an action

2012-03-09 Thread Sven Barth
Hello together! As I already said on fpc-devel I'm currently playing around with fcl-web and hit the next problem: I successfully managed to build and run my first module, but when I added a second one I got an error when I use the following URL to call my module (of which one is registered

Re: [fpc-pascal] fpWeb: Error when trying to call a module without an action

2012-03-09 Thread michael . vancanneyt
On Fri, 9 Mar 2012, Sven Barth wrote: Hello together! As I already said on fpc-devel I'm currently playing around with fcl-web and hit the next problem: I successfully managed to build and run my first module, but when I added a second one I got an error when I use the following URL to

[fpc-pascal] FPC Advanced Records

2012-03-09 Thread Mark Morgan Lloyd
Can an Advanced Record, i.e. a record which as well as having fields has at least one embedded function, be safely used as a cast or type transfer overlaying unstructured bytes? -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his

Re: [fpc-pascal] FPC Advanced Records

2012-03-09 Thread Jonas Maebe
On 09 Mar 2012, at 21:38, Mark Morgan Lloyd wrote: Can an Advanced Record, i.e. a record which as well as having fields has at least one embedded function, be safely used as a cast or type transfer overlaying unstructured bytes? Yes. Jonas___

Re: [fpc-pascal] FPC Advanced Records

2012-03-09 Thread Jonas Maebe
On 09 Mar 2012, at 22:26, Mark Morgan Lloyd wrote: Thanks Jonas, I don't think I need to do it but I thought it was a fair question: better safe than sorry. OK, so hopefully I can get away with another. I'm looking at a program written in Delphi, which reads a file containing the image

Re: [fpc-pascal] FPC Advanced Records

2012-03-09 Thread Martin
On 09/03/2012 21:26, Mark Morgan Lloyd wrote: but is there any way to define something like an endianness-correcting type, i.e.: Type TAWSHeader=Record ThisSize: WordLE; .. where by the time ThisSize is accessed any disparity has been corrected? Not sure if this will be of any

Re: [fpc-pascal] FPC Advanced Records

2012-03-09 Thread Mark Morgan Lloyd
Jonas Maebe wrote: On 09 Mar 2012, at 22:26, Mark Morgan Lloyd wrote: Thanks Jonas, I don't think I need to do it but I thought it was a fair question: better safe than sorry. OK, so hopefully I can get away with another. I'm looking at a program written in Delphi, which reads a file

Re: [fpc-pascal] FPC Advanced Records

2012-03-09 Thread Mark Morgan Lloyd
Martin wrote: On 09/03/2012 21:26, Mark Morgan Lloyd wrote: but is there any way to define something like an endianness-correcting type, i.e.: Type TAWSHeader=Record ThisSize: WordLE; .. where by the time ThisSize is accessed any disparity has been corrected? Not sure if this