X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f From: Kbwms AT aol DOT com Message-ID: <140.1c1f96eb.2cdfe659@aol.com> Date: Sun, 9 Nov 2003 13:50:01 EST Subject: Re: C99 Functions Under Development and Checkout To: djgpp-workers AT delorie DOT com MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="part1_140.1c1f96eb.2cdfe659_boundary" X-Mailer: 8.0 for Windows sub 6021 Reply-To: djgpp-workers AT delorie DOT com --part1_140.1c1f96eb.2cdfe659_boundary Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit In a message dated 11/9/2003 5:10:17 AM Eastern Standard Time, rich AT phekda DOT freeserve DOT co DOT uk writes: > You missed my point. My point was that by making math_errhandling a macro > that > calls a function to return the math error handling method(s), you stop the > user from being able to modify math_errhandling. I.e.: the following code > will > not compile: > > some_maths_function(); > math_errhandling = MATH_ERRNO; > > Summary: Advantages of using a macro to call the get function: > On the other hand, with the method now implemented: 1. User can set the global variable math_errhandling at the beginning of the program and that value will endure for the life of the program no matter what math_errhandling is reset to. 2. Or, user need do nothing to the variable and it will be initialized to its default which is (MATH_ERRNO|MATH_ERREXCEPT). 3. Or, user can call function __set_math_errhandling(). Thus, user has three choices. Frankly, I prefer making math_errhandling an identifier with external linkage. KB Williams --part1_140.1c1f96eb.2cdfe659_boundary Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable In a message dated 11/9/2003 5:10:17 AM Eastern Standard= Time, rich AT phekda DOT freeserve DOT co DOT uk writes:

You missed my point. My point was that by making math_errha= ndling a macro that
calls a function to return the math error handling method(s), you stop the user from being able to modify math_errhandling. I.e.: the following code wi= ll
not compile:

  some_maths_function();
  math_errhandling =3D MATH_ERRNO;

Summary: Advantages of using a macro to call the get function:


On the other hand, with the method now implemented:

1. User can set the global variable math_errhandling at the beginning of the= program and that value will endure for the life of the program no matter wh= at math_errhandling is reset to. 

2. Or, user need do nothing to the variable and it will be initialized to it= s default which is (MATH_ERRNO|MATH_ERREXCEPT). 

3. Or, user can call function __set_math_errhandling(). 

Thus, user has three choices.


Frankly, I prefer making math_errhandling an identifier with external linkag= e.


KB Williams
--part1_140.1c1f96eb.2cdfe659_boundary--