[alt.msdos.programmer] Borland Turbo C 1.5

mds1@cbnewsm.att.com (marc.d.sayre) (01/03/91)

Hello programmers,

	Please do NOT respond to the default address but to ihlpb!hvmpa!eotto

	For all of you out there that use borland turbo C 1.5 or later I have a
	question. I have been programming a lot of stuff with floats, where I have
	a global structure called empdata with about ten floats in there.

	I use this structure a lot across functions by :

	function()
	{
		struct empdata *empprem;

		~
		~
		empprem = &EmpPrem;
	etc 
	etc
	}

	where EmpPrem is defined as a global structure in the following form

	struct empdata EmpPrem;

	I recently started to expand the code and start getting weird responses
	when I execute the program, all the other functions that use the global structure
	work fine, I add a function and it works fine, I change some lines of
	code and get strange errors. I take away the code again and still get
	the weird errors.

	I verified my code over and over, set breakpoints but still get
	abnormal program termination or floating point overflow et etc.

	It almost looks like the compiler does not link some of the stuff pro
	perly. The point were I fail right now is a function with an 
	if statement

	if (type ==1 ) {
	}
	else {
		etc  etc
	}

	I checked both cases and the function always come to the point where
	it should return (printf I put in there) but for type ==1 the program
	abort with abnormal program termination. For type != 1 it goes 
	back to the caller..




	HELP HELP
	Any ideas to:

cbnewsm!ihlpb!hvmpa!eotto
AT&T Network Systems UK

----------------------------------+---------------------------------
It's better to burn out           |
	than to                   |
    fade away                     | Erick Otto
----------------------------------+---------------------------------