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 One: TRUE Test

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] 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

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,

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 the directory

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 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 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 could

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 respondiendo ahí? X'D You're

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 (as in

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