Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!hplabs!hpda!hpcuhb!hpcllla!hpcllca!shankar From: shankar@hpcllca.HP.COM (Shankar Unni) Newsgroups: comp.windows.x Subject: Re: Help on Resource Conversion anyone? Message-ID: <5130002@hpcllca.HP.COM> Date: 15 Feb 89 01:59:39 GMT References: <100920054@hpcvlx.HP.COM> Organization: Hewlett Packard Calif. Language Lab Lines: 17 > Unfortunately, this is where funny little compiler/architecture > problems come into play. The type of arg.value is caddr_t. Due to the > implementation of promotion rules on some machines (I'm not a compiler > wizard, so the implementation could be entirely correct), when a float > is assigned to a caddr_t, it is converted to an int. But you don't > want an int? Too dang bad. You'll have to come up with a work-around. Like float f = 1.00; ... XtSetArg(arg[n], XtSomeResource, *((caddr_t *)&f)); n++; Assuming, of course, that a caddr_t and a float have the same size (otherwise you're hosed..); --- Shankar Unni.