Article View: comp.os.ms-windows.programmer.misc
Article #2883Re: int / int ?
From: Will Rose
Date: Sun, 29 Nov 1998 00:00
Date: Sun, 29 Nov 1998 00:00
17 lines
1476 bytes
1476 bytes
Tom Burke (tomii@erols.com) wrote: : I have a question about the following statement: : cxCaps = (tm.tmPitchAndFamily & 1 ? 3 : 2) * cxChar / 2 ; : Now, this is easy enough to understand what it's _supposed_ to do, : which is look at the last bit of tm.tmPitchAndFamily. If the bit is a : '1', then 3 is used, if the bit is '0', then 2 is used. The used number : is then multiplied by cxChar and then it is all divided by 2. This : is to determine whether or not a true type font is used, and if so, : to multipy the average width of capital letters by 150% (1.5). The operations * and / are both left-associative, so 5 * 3 / 2 comes to 7, and 5 / 2 * 3 comes to 6. Will
Technical Details
Message-ID:
<912351722.217465@optional.cts.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<366155E6.632A909D@erols.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f8d38,7450d421b142666f X-Google-Attributes: gidf8d38,public X-Google-Thread: 105df1,7450d421b142666f X-Google-Attributes: gid105df1,public X-Google-Thread: 1014db,7450d421b142666f X-Google-Attributes: gid1014db,public From: cwr@cts.com (Will Rose) Subject: Re: int / int ? Date: 1998/11/29 Message-ID: <912351722.217465@optional.cts.com> X-Deja-AN: 416775513 Cache-Post-Path: optional.cts.com!cwr@crash-i2.cts.com References: <366155E6.632A909D@erols.com> Organization: CTS Network Services (CTSNET), San Diego, CA Followup-To: comp.os.ms-windows.programmer.misc,borland.public.cpp.language,comp.lang.c Newsgroups: comp.os.ms-windows.programmer.misc,borland.public.cpp.language,comp.lang.c