delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/11/09/13:50:24

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
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

<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>
&nbsp; some_maths_function();<BR>
&nbsp; 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.&nbsp; <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).&nbsp; <BR>
<BR>
3. Or, user can call function __set_math_errhandling().&nbsp; <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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019