[fpc-pascal]QWord vs. function Abs
Hallo, i'm newbie and maybe making something wrong. Small example for go32v2: var q1,q2:qword; begin q1:=10; q2:=20; writeln(Abs(q1-q2)); end. With FPC compiler 1.0.10/IDE 0.9.2 i got this error message: 'Can't determine which overloaded function to call' Any idea ? With type INT64,Word it is o.k. I think this version 1.0.x doesn't full support type QWord. I want try the new version 1.1.x, but under Windows NT/SP6a (czech version) is not possible to start \pp\bin\go32v2\fp.exe. Lubomír Čabla ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal]QWord vs. function Abs
On Wed, Aug 20, 2003 at 02:34:23PM +0200, [EMAIL PROTECTED] wrote: > Hallo, > i'm newbie and maybe making something wrong. > > Small example for go32v2: > > var q1,q2:qword; > begin > q1:=10; > q2:=20; > writeln(Abs(q1-q2)); > end. I get runtime 215 with FPC 1.0.6 ... This probably means that FPC cannot support qwords in the abs function even though the documentation says "Any numerical type". Not sure though :) cheers James > > With FPC compiler 1.0.10/IDE 0.9.2 i got this error message: > > 'Can't determine which overloaded function to call' > > Any idea ? > > With type INT64,Word it is o.k. > I think this version 1.0.x doesn't full support type QWord. > > I want try the new version 1.1.x, but under Windows NT/SP6a (czech version) > is not possible to start \pp\bin\go32v2\fp.exe. > > Lubom?r ?abla > > ___ > fpc-pascal maillist - [EMAIL PROTECTED] > http://lists.freepascal.org/mailman/listinfo/fpc-pascal -- - -Zero Defect Software Engineers Group - ZDSEG - -You need only two tools. WD-40 and duct tape. -If it doesn't move and it should, use WD-40. -If it moves and shouldn't, use the tape. ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal]Debuggin
Hi, 1) Is there anyway of finding out the cooresponding source line when a program crashes and only outputs the following: An unhandled exception occurred at 0x080A33B1 : List index exceeds bounds (-1) 0x080A33B1 2) With compile modes: -gg -gl Aren't line info and tracebacks suppose to be shown, the above example does not show these. cheers James -- - -Zero Defect Software Engineers Group - ZDSEG - -You need only two tools. WD-40 and duct tape. -If it doesn't move and it should, use WD-40. -If it moves and shouldn't, use the tape. ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal]QWord vs. function Abs
> Hallo, > i'm newbie and maybe making something wrong. > > Small example for go32v2: > > var q1,q2:qword; > begin > q1:=10; > q2:=20; > writeln(Abs(q1-q2)); > end. I get runtime 215 with FPC 1.0.6 ... This probably means that FPC cannot support qwords in the abs function even though the documentation says "Any numerical type". The problem is that there is a abs(int64) and abs(cardinal) and it can't decide which to take. An abs(qword) needs to be added Peter ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal]QWord vs. function Abs
On Wednesday 20 August 2003 16:56, you wrote: > > > Hallo, > > > i'm newbie and maybe making something wrong. > > > > > > Small example for go32v2: > > > > > > var q1,q2:qword; > > > begin > > > q1:=10; > > > q2:=20; > > > writeln(Abs(q1-q2)); > > > end. > > > >I get runtime 215 with FPC 1.0.6 ... > > > >This probably means that FPC cannot support qwords in the abs function > >even though the documentation says "Any numerical type". > > The problem is that there is a abs(int64) and abs(cardinal) and it can't > decide which to take. An abs(qword) needs to be added IMHO, abs(cardinal) doesn't make any sense .. calling it could even be considered a design or coding error, couldn't it? Anton. -- "Adas Methode war, wie sich zeigen wird, Tagträume in offenbar korrekte Berechnungen einzuweben." Doris Langley Moore: Ada, Countess of Lovelace (London 1977). -- Ing. Anton Tichawa Volkertstrasse 19 / 20 A-1020 Wien phone: +43 1 218 97 59 email: [EMAIL PROTECTED] -- ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal]QWord vs. function Abs
At 18:24 20-8-2003, you wrote: On Wednesday 20 August 2003 16:56, you wrote: > > > Hallo, > > > i'm newbie and maybe making something wrong. > > > > > > Small example for go32v2: > > > > > > var q1,q2:qword; > > > begin > > > q1:=10; > > > q2:=20; > > > writeln(Abs(q1-q2)); > > > end. > > > >I get runtime 215 with FPC 1.0.6 ... > > > >This probably means that FPC cannot support qwords in the abs function > >even though the documentation says "Any numerical type". > > The problem is that there is a abs(int64) and abs(cardinal) and it can't > decide which to take. An abs(qword) needs to be added IMHO, abs(cardinal) doesn't make any sense .. calling it could even be considered a design or coding error, couldn't it? Then abs(qword) also doesn't make any sense Peter ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal]linux or libc ?
There seems to be some minor conflicts between the linux unit and the new libc unit on 1.0.10 They both seem to get the job done, but putting them both in the same uses clause could make me crazy. :-o Any suggestions/opinions as to which one is best? __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal]linux or libc ?
> There seems to be some minor conflicts between > the linux unit and the new libc unit on 1.0.10 > > They both seem to get the job done, but putting them > both in the same uses clause could make me crazy. :-o > > Any suggestions/opinions as to which one is best? linux is the FPC unit for Unix. In the next major version it will be split up and renamed to baseunix/unix/linux, and work on all supported Unixy platforms. libc is a purely Kylix compability unit for linux/i386 only. Only use it for Kylix emulation purposes and maybe some linux specific stuff. ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal]QWord vs. function Abs
On Wednesday 20 August 2003 20:17, you wrote: > At 18:24 20-8-2003, you wrote: > >On Wednesday 20 August 2003 16:56, you wrote: > > > > > Hallo, > > > > > i'm newbie and maybe making something wrong. > > > > > > > > > > Small example for go32v2: > > > > > > > > > > var q1,q2:qword; > > > > > begin > > > > > q1:=10; > > > > > q2:=20; > > > > > writeln(Abs(q1-q2)); > > > > > end. > > > > > > > >I get runtime 215 with FPC 1.0.6 ... > > > > > > > >This probably means that FPC cannot support qwords in the abs function > > > >even though the documentation says "Any numerical type". > > > > > > The problem is that there is a abs(int64) and abs(cardinal) and it > > > can't decide which to take. An abs(qword) needs to be added > > > >IMHO, abs(cardinal) doesn't make any sense .. calling it could even be > >considered a design or coding error, couldn't it? > > Then abs(qword) also doesn't make any sense True. So I think the best way is either to declare var q1, q2: int64; or, if they have to be qwords for some reason, to typecast: writeln(abs(int64(q1) - int64(q2))); Still, the documentation states "any numerical type". If there's time for it, FPC should imho generate a call to abs(int64) and possibly issue a warning when it encounters abs(qword). Anton -- Ing. Anton Tichawa Volkertstrasse 19 / 20 A-1020 Wien phone: +43 1 218 97 59 email: [EMAIL PROTECTED] -- "Adas Methode war, wie sich zeigen wird, Tagträume in offenbar korrekte Berechnungen einzuweben." Doris Langley Moore: Ada, Countess of Lovelace (London 1977). -- ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal