Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!hplabs!hp-pcd!hpcvlx!ben From: ben@hpcvlx.HP.COM (Benjamin Ellsworth) Newsgroups: comp.windows.x Subject: Re: Re: XtConvert & SetValues for floats Message-ID: <100920091@hpcvlx.HP.COM> Date: 25 Jul 89 21:24:53 GMT References: <14000@lanl.gov> Organization: Hewlett-Packard Co., Corvallis, OR, USA Lines: 25 > ... Is there something wierd about floats ...? You betcha! The Arg struct has a char * for name and a caddr_t for value. When a float is loaded into a caddr_t, your friendly C compiler converts the float into an int. Ain't that great?! Now perhaps you can understand why there are no examples of widgets which use float resources. :-( You can set up your resource as a pointer to a float, but that brings its own problems. Good Luck! ----------------------------------------------------------------------- Benjamin Ellsworth | ben@cv.hp.com | INTERNET Hewlett-Packard Company | {backbone}!hplabs!hp-pcd!ben | UUCP 1000 N.E. Circle | (USA) (503) 750-4980 | FAX Corvallis, OR 97330 | (USA) (503) 757-2000 | VOICE ----------------------------------------------------------------------- All relevant disclaimers apply. -----------------------------------------------------------------------