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: dewarr@my-dejanews.com Subject: Re: Boolean Representation Date: 1998/09/24 Message-ID: <6udriu$hfi$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 394400670 References: <6udkcj$87j$1@nnrp1.dejanews.com> X-Http-Proxy: 1.0 x13.dejanews.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Thu Sep 24 16:21:50 1998 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/2.02 (OS/2; 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? Whether true or false, this is junky coding, just use Boolean'Pos (val) to get 0 or 1 in a for sure portable manner. Remember that to use an unchecked conversion for Boolean, you would have to use a 1-bit integer, anything else most definitely gives an implementation defined result. -----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum