Mail Archives: djgpp-workers/2003/11/09/13:50:24
--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
<HTML><FONT FACE=3Darial,helvetica><FONT SIZE=3D3 FAMILY=3D"SERIF" FACE=3D"=
Georgia" LANG=3D"0">In a message dated 11/9/2003 5:10:17 AM Eastern Standard=
Time, rich AT phekda DOT freeserve DOT co DOT uk writes:<BR>
<BR>
<BLOCKQUOTE TYPE=3DCITE style=3D"BORDER-LEFT: #0000ff 2px solid; MARGIN-LEFT=
: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px"></FONT><FONT COLOR=3D"#000000"=
style=3D"BACKGROUND-COLOR: #ffffff" SIZE=3D2 FAMILY=3D"SANSSERIF" FACE=3D"A=
rial" LANG=3D"0">You missed my point. My point was that by making math_errha=
ndling a macro that<BR>
calls a function to return the math error handling method(s), you stop the<B=
R>
user from being able to modify math_errhandling. I.e.: the following code wi=
ll<BR>
not compile:<BR>
<BR>
some_maths_function();<BR>
math_errhandling =3D MATH_ERRNO;<BR>
<BR>
Summary: Advantages of using a macro to call the get function:<BR>
</BLOCKQUOTE><BR>
</FONT><FONT COLOR=3D"#000000" style=3D"BACKGROUND-COLOR: #ffffff" SIZE=3D3=
FAMILY=3D"SERIF" FACE=3D"Georgia" LANG=3D"0"><BR>
On the other hand, with the method now implemented:<BR>
<BR>
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. <BR>
<BR>
2. Or, user need do nothing to the variable and it will be initialized to it=
s default which is (MATH_ERRNO|MATH_ERREXCEPT). <BR>
<BR>
3. Or, user can call function __set_math_errhandling(). <BR>
<BR>
Thus, user has three choices.<BR>
<BR>
<BR>
Frankly, I prefer making math_errhandling an identifier with external linkag=
e.<BR>
<BR>
<BR>
KB Williams</FONT></HTML>
--part1_140.1c1f96eb.2cdfe659_boundary--
- Raw text -