Path: csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: "Rod Pemberton" Newsgroups: comp.lang.forth Subject: Re: PICK changed from 1-based to 0-based? Date: Fri, 03 Jan 2014 08:04:03 -0500 Organization: Aioe.org NNTP Server Lines: 62 Message-ID: References: <7xvby8f6md.fsf@ruckus.brouhaha.com> <_IWdne2ZbpNkmVzPnZ2dnUVZ_t6dnZ2d@supernews.com> <7xk3emu934.fsf@ruckus.brouhaha.com> <2013Dec30.170626@mips.complang.tuwien.ac.at> <2014Jan2.103423@mips.complang.tuwien.ac.at> <52c69250$0$2908$e4fe514c@news2.news.xs4all.nl> NNTP-Posting-Host: CNsg4fVcCsvs3UaOgZtQCw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.16 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.forth:27628 On Fri, 03 Jan 2014 05:34:53 -0500, Hans Bezemer wrote: > Rod Pemberton wrote: >> In C, logical "true" is "not false", where "false" is >> zero. That applies for all versions of C. > > As usual, As usual ... ? Anton said "true=1" in C. That's simply not true. (pun intended) > you forget to mention that C has (I repeat it again) full logical > STANDARDIZED operators like && and || This has no bearing on the issue. What I stated above is true for && and || as well. The INPUTS to && and || are false (0) or true (not false). The OUTPUTS are false (0) or true (1). true (1) is still not false. > so it doesn't care what value "true" Exactly, only "false" (zero) is of concern to C. That is what I stated which you took objection to. > Furthermore, what do you think this renders? > > #include > void main (void) > { > printf ("%d\n", 2 == 2); > } > > Right: 1. > That doesn't prove true in C is one. That only proves that '==' generates a well qualified flag in C for true, using 1 for true. #include int main(void) { int i; for(i=0;i<256;i++) { if(i) printf("true %d\n",i); else printf("false %d\n",i); } return(0); } See, 1, 2, 3, ... etc are all true too. So, how is "true=1" ... ? Rod Pemberton