RE: [fpc-devel] compiler bug?

2004-12-31 Thread peter green
Different languages approach boolean operations in different ways. 1: the C way false=0 true=anything else seperate logical and bitwise operators. 2: the BASIC way (also used by the access database) false=0 true=-1 logical and bitwise operations therefore equivilent (though it should be noted

RE: [fpc-devel] compiler bug?

2004-12-31 Thread Jose Manuel
[] > > You're programing, the C way. [] > > > You can't expect that -1 equals True, and any other value > equals false, (I > > You can expect whatever it's documented "equals true" and > sometimes you must That's right. I can expect whatever is documented. In C there's no boolean type. In Pascal (

Re: [fpc-devel] compiler bug?

2004-12-31 Thread Nico Aragón
El Viernes, 31 de Diciembre de 2004 18:40, Jose Manuel escribiste: > > > > else > > > > WriteLn('Other'); > > > > > > This better should read: > > > WriteLn('corrupt data space!!!'); Panic; > > > > Much more useful :-> > > (AFAIK) you do. ¡Serás melón! ¿A qué se supone que estás respondiend

RE: [fpc-devel] compiler bug?

2004-12-31 Thread Jose Manuel
> > > > else > > > WriteLn('Other'); > > > > This better should read: > > WriteLn('corrupt data space!!!'); Panic; > > Much more useful :-> (AFAIK) you do. You're programing, the C way. You can't expect that -1 equals True, and any other value equals false, (I really dunno, but I think I

Re: [fpc-devel] compiler bug?

2004-12-31 Thread Nico Aragón
El Viernes, 31 de Diciembre de 2004 17:18, Florian Klaempfl escribiste: > > That's great! But why do you tell it *to me*? > > I only cross read the thread and wanted to clarify things :) Oh, I see. Happy new year! :-) -- saludos, Nico Aragón http://espira.net/nico/ __

Re: [fpc-devel] compiler bug?

2004-12-31 Thread Florian Klaempfl
Nico Aragón wrote: El Viernes, 31 de Diciembre de 2004 14:58, Florian Klaempfl escribiste: type boolean = (false,true); is how boolean is defined/declared so assigning anything else than true or false to a boolean might cause problems :) That's great! But why do you tell it *to me*? I only cross

Re: [fpc-devel] compiler bug?

2004-12-31 Thread Nico Aragón
El Viernes, 31 de Diciembre de 2004 14:58, Florian Klaempfl escribiste: > type boolean = (false,true); > is how boolean is defined/declared > > so assigning anything else than true or false to a boolean might cause > problems :) That's great! But why do you tell it *to me*? I didn't start this t

Re: [fpc-devel] Interface to compressed files and archives

2004-12-31 Thread Michael . VanCanneyt
On Fri, 31 Dec 2004, DrDiettrich wrote: > [EMAIL PROTECTED] wrote: > > > Naming a unit with 'u' standard does not seem useful to me, but this is > > a matter of taste. > ... > > All other files are assumed to be units. > > (projects/packages have distinct extensions anyway) > > No problem at t

[fpc-devel] fpUmask in Darwin

2004-12-31 Thread Gary Handelman
Hello. Does anyone know what happened to the fpUmask function under fpc Darwin 1.9.5 [2004/08/08] for powerpc? I'm guessing that It's supposed to be in the baseunix unit, and I have verified this under fpc Linux 1.9.4 [2004/05/30] for i386. Using the Darwin compiler produces: Identifier not fo

Re: [fpc-devel] compiler bug?

2004-12-31 Thread Florian Klaempfl
Nico Aragón wrote: type boolean = (false,true); is how boolean is defined/declared so assigning anything else than true or false to a boolean might cause problems :) else WriteLn('Other'); This better should read: WriteLn('corrupt data space!!!'); Panic; Much more useful :-> ___

Re: [fpc-devel] compiler bug?

2004-12-31 Thread Nico Aragón
El Viernes, 31 de Diciembre de 2004 13:13, DrDiettrich escribiste: > Nico Aragón wrote: > > IIRC, any non-zero value is evaluated as "True" for a Boolean variable. > > You should not guess about any implementation. I don't. Do I? > > else > > WriteLn('Other'); > > This better should read: >

Re: [fpc-devel] Interface to compressed files and archives

2004-12-31 Thread DrDiettrich
[EMAIL PROTECTED] wrote: > Naming a unit with 'u' standard does not seem useful to me, but this is > a matter of taste. ... > All other files are assumed to be units. > (projects/packages have distinct extensions anyway) No problem at the directory level, but how to distinguish names of units, ty

Re: [fpc-devel] Interface to compressed files and archives

2004-12-31 Thread DrDiettrich
Marco van de Voort wrote: > Better have a separate way. Otherwise you can't set e.g. a compressionlevel > for that stream, _or_ you have to have lots of different constructors. Compressors can require any kind and number of arguments, that must be reflected somewhere, e.g. in the specific constru

Re: [fpc-devel] compiler bug?

2004-12-31 Thread DrDiettrich
peter green wrote: > > I think the old saying goes garbage in garbage out. 100% > range checking should probablly catch this sort of stuff but that has a high > performance penalty and is therefore usually disabled. IIRC range checking occurs on assignments, not on using the values, just to red

Re: [fpc-devel] compiler bug?

2004-12-31 Thread DrDiettrich
Nico Aragón wrote: > IIRC, any non-zero value is evaluated as "True" for a Boolean variable. You should not guess about any implementation. Forcing out-of-range values into strictly typed variables is a user bug, at the full risk of (and shame on) that user. Who's to blame when somebody applies

Re: [fpc-devel] Re: compiler bug?

2004-12-31 Thread Peter Vreman
> How about this one: > > > program problem; > begin > Write('Test One: '); > if ( boolean(255) ) then WriteLn(True) else WriteLn(False); > Write('Test Two: '); > WriteLn( boolean(255) ); > end. > > > FPC 1.9.4 output: > Test One: FALSE > Test Two: TRUE > > Kylix 1.0 output: > Test On

[fpc-devel] Re: compiler bug?

2004-12-31 Thread Jeff Pohlmeyer
How about this one: program problem; begin Write('Test One: '); if ( boolean(255) ) then WriteLn(True) else WriteLn(False); Write('Test Two: '); WriteLn( boolean(255) ); end. FPC 1.9.4 output: Test One: FALSE Test Two: TRUE Kylix 1.0 output: Test One: TRUE Test Two: Segmentatio