Path: utzoo!attcan!ncrcan!ziebmef!mikek From: mikek@ziebmef.mef.org (Mike King) Newsgroups: comp.windows.ms Subject: Re: FAR functions and float types Message-ID: <1989Sep14.101215.21281@ziebmef.mef.org> Date: 14 Sep 89 14:12:14 GMT References: <246400022@uxa.cso.uiuc.edu> Reply-To: mikek@ziebmef.mef.org (Mike King) Organization: Ziebmef Public Access Unix, Toronto, Ontario Lines: 29 In article <246400022@uxa.cso.uiuc.edu> mms00786@uxa.cso.uiuc.edu writes: >Here's what happens: > >a) if I declare something like > void FAR fnPlotSegment (hWnd, fFromX, fToX) > HWND hWnd; > float fFromX; > float fToX; > {...} > then I am unable to pass the float type arguments! Everything compiles, runs, > etc. but if I try to print the float values passed in, they are always 0.0! >c) but the declaration > void FAR fnPlotAnalog (hWnd, fFromX, fToX) > HWND hWnd; > double fFromX; > double fToX; > {....} > works without a glitch! The only problem is that with this solution, I am >Milan I've had the exact same problem with passing float arguments in Windows! And I got around it by using doubles instead of floats. I know people are thinking "Changing to doubles pushes the stack around and maskes the real bug", but I don't think so. This application works flawlessly in debug Windows. No problems anywhere else since I changed from floats to doubles?!?!? It's very suspicious and I welcome any explanation. For reference: we compile using the alternate math library.