Xref: utzoo comp.lang.c:33302 comp.os.msdos.programmer:1741 Path: utzoo!utgpu!watserv1!watmath!att!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!elroy.jpl.nasa.gov!jarthur!uunet!mcsun!ukc!edcastle!elee24 From: elee24@castle.ed.ac.uk (H Bruce) Newsgroups: comp.lang.c,comp.os.msdos.programmer Subject: Paramters of type float getting corrupted in Microsoft C 5.1. HELP !!! Message-ID: <6947@castle.ed.ac.uk> Date: 30 Oct 90 19:46:42 GMT Organization: Dept. Electrical Engineering, Edinburgh University, Scotland, UK. Lines: 28 I am having a problem with Microsoft C (V 5.1). When I pass a parameter of type float (by value) to a function, by the time it is read from the stack by the function it is corrupted. The corrupted value is something very small (eg X.XXXXe-XXX) and varies depending on the parameter. The program comprises 2000 lines of code in 7 modules producing a 90K EXE file. I am using the the large memory model. When I extract the offending part of the program and run it independently, the problem vanishes. This is happening in several functions. If I get around it by not passing parameters the problem manifests itself somewhere else. I have stack checking enabled. I have allocated 8K for the stack and there is over 1K free. (The stack size may sound a bit large but I pass some large structures as paramters.) Does anyone know what is is happening? How can I look at the stack in codeview ? How can I stop execution in codeview when the parameter is corrupted ? (This would have to be at assembly level I think ...... yeeeuuuch) Thanks in desperation, Henry Bruce.