Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!wuarchive!decwrl!adobe!asente From: asente@adobe.com (Paul Asente) Newsgroups: comp.windows.x Subject: Re: the magic number 32637 in Athena form widget Message-ID: <7894@adobe.UUCP> Date: 1 Nov 90 21:47:37 GMT References: <1990Oct31.223545.14828@sbcs.sunysb.edu> <2493@gazette.bcm.tmc.edu> Sender: news@adobe.COM Organization: Adobe Systems Inc. Lines: 25 In article <2493@gazette.bcm.tmc.edu> etaylor@wilkins.iaims.bcm.tmc.edu (Eric Taylor) writes: > >32637 is very close to the maximum number a "short" >can be. Shorts are used for various things such as Position. >(Very unfortunate.) The authors of Xt got >very hung up on types and used things like "short"'s when they thought that >no one whould possibly ask for a number greater than 32637. I wish people >would stop using "short" it always bites you in the ass eventually. (Please put newlines into your messages) The decision that positions should be signed short values was not made in Xt, it was made in the protocol. If Xt had extended precision super extra long values for positions you still would not be able to use any more of the range than 16 signed bits worth. The decision made in the protocol was not perfect (since sizes are 16 bits unsigned but coordinates are 16 bits signed you can create a window with 75% of its area unusable (also known as "The Twilight Zone")) but choosing 16 bits over 32 was a tradeoff between memory and communication bandwidth costs vs. possible future hardware that could display humungous windows. The hardware still isn't around today; if you need more than 16 bits worth of positioning on current hardware you're not programming your application right. -paul asente asente@adobe.com ...decwrl!adobe!asente