Page 1 of 1

MIKROC MY OWN CONSTANTS

Posted: 01 Oct 2010 12:17
by fernandomarques
Hi!
Can Anyone help me
I want to create my constants on mikroC to use it on library.
Like #define CONST 00
How can i do it?

Somebody can give me one examplo?

thanks
fernandomarques

Re: MIKROC MY OWN CONSTANTS

Posted: 04 Oct 2010 13:50
by ranko.rankovic
Hello fernandomarques,

You can define constants like this, in code:

Code: Select all

const double PI = 3.14159;
Or you can define it like this, in Preprocessor:

Code: Select all

#define TRUE 1
#define FALSE 0
#define BS '\b'
#define TAB '\011'
You can read more about this in our Help file, where everything is good explained.
Best regards