header

B

Bill Cunningham

I'm not sure about this #endif. Is this conditional preprocessing
correct?

#include <stdio.h>
#include <stdlib.h>
#ifdef MATH
#include <math.h>
#endif

double Os(double, double);
double Rsi(double, double, int);
/*double Ema(double,int);*/

I keep this header to compile object files and keep functions at global
scope.

Bill
 
R

Richard

Bill Cunningham said:
I'm not sure about this #endif. Is this conditional preprocessing
correct?

#include <stdio.h>
#include <stdlib.h>
#ifdef MATH
#include <math.h>
#endif

double Os(double, double);
double Rsi(double, double, int);
/*double Ema(double,int);*/

I keep this header to compile object files and keep functions at global
scope.

Bill

You forgot to put a "hash" (*) in front of "Bill" which is only 16 bits
btw.
 
K

Keith Thompson

Bill Cunningham said:
I'm not sure about this #endif. Is this conditional preprocessing
correct?

#include <stdio.h>
#include <stdlib.h>
#ifdef MATH
#include <math.h>
#endif

double Os(double, double);
double Rsi(double, double, int);
/*double Ema(double,int);*/

It's syntactically correct; it means that the "#include <math.h>" will
take effect only if "MATH" is defined as a macro. It's impossible to
tell whether it's correct for your purposes.

[...]
 
G

Guest

    I'm not sure about this #endif. Is this conditional preprocessing
correct?

its a code fragment without any text. The syntax is ok but (as usual)
we have no idea what you are trying to do.
#include <stdio.h>
#include <stdlib.h>
#ifdef MATH
#include <math.h>
#endif

seems a bit odd to make the inclusion of math.h conditional
but whatever floats your boat
double Os(double, double);
double Rsi(double, double, int);
/*double Ema(double,int);*/

    I keep this header to compile object files and keep functions at global
scope.

I've no idea what this means
 
R

Richard

its a code fragment without any text. The syntax is ok but (as usual)
we have no idea what you are trying to do.


seems a bit odd to make the inclusion of math.h conditional
but whatever floats your boat


I've no idea what this means

Bill is a troll. A real troll. Not a "troll" because he thinks some of
the regs are so far up themselves that you can only see their feet.
 
B

Bill Cunningham

I'm not sure about this #endif. Is this conditional preprocessing
correct?

its a code fragment without any text. The syntax is ok but (as usual)
we have no idea what you are trying to do.
#include <stdio.h>
#include <stdlib.h>
#ifdef MATH
#include <math.h>
#endif

seems a bit odd to make the inclusion of math.h conditional
but whatever floats your boat

Rsi=relatve strength index
Os=oscillator
Ema=exponentional moving average

The Ema is commented out because as of right now I haven't written a
function in a .c file yet. The math conditional is for future functions that
might need math.h's sqrt sin cosin etc. My question was about syntax. I
guess the #endif is required from what I have read.

Bill
 
G

Guest

On 28 Feb, 01:41, "Bill Cunningham" <[email protected]> wrote:

your quoting is screwed up again

[it's] a code fragment without any [con]text. The syntax is ok but (as usual)
we have no idea what you are trying to do.
#include <stdio.h>
#include <stdlib.h>
#ifdef MATH
#include <math.h>
#endif

seems a bit odd to make the inclusion of math.h conditional
but whatever floats your boat
    Rsi=relatve strength index
    Os=oscillator
    Ema=exponentional moving average

these terms mean nothing to me. It doesn't explain to me
why you are conditionally including math.h
The Ema is commented out because as of right now I haven't written a
function in a .c file yet. The math conditional is for future functions that
might need math.h's sqrt  sin cosin etc. My question was about syntax. I
guess the #endif is required from what I have read.

yes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,085
Latest member
cryptooseoagencies

Latest Threads

Top