From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5697899e4423465c X-Google-Attributes: gid103376,public From: dennison@telepath.com Subject: Re: Boolean Representation Date: 1998/09/24 Message-ID: <6uecer$3sf$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 394496729 References: <6udkcj$87j$1@nnrp1.dejanews.com> X-Http-Proxy: 1.0 x3.dejanews.com:80 (Squid/1.1.22) for client 204.48.27.130 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Thu Sep 24 21:09:47 1998 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.05 [en] (WinNT; I) Date: 1998-09-24T00:00:00+00:00 List-Id: In article <6udkcj$87j$1@nnrp1.dejanews.com>, matthew_snyder@my-dejanews.com wrote: > Is it safe to make the assumption that a boolean value of FALSE will always > be represented as a 0 and a value of TRUE will always be represented as a 1? > Will an unchecked conversion from a boolean to an integer always yield the > same results with different compilers? I believe the only guarantee you get is that the value of True is larger than the value of False. To get the behavior you want portably, do a: Boolean'pos(Boolean_Variable) -- T.E.D. -----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum