MIKROC MY OWN CONSTANTS

General discussion on mikroC.
Post Reply
Author
Message
fernandomarques
Posts: 26
Joined: 24 May 2010 10:15

MIKROC MY OWN CONSTANTS

#1 Post by fernandomarques » 01 Oct 2010 12:17

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

User avatar
ranko.rankovic
Posts: 433
Joined: 11 Jun 2010 09:22

Re: MIKROC MY OWN CONSTANTS

#2 Post by ranko.rankovic » 04 Oct 2010 13:50

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
Ranko Rankovic
mikroElektronika [Support Department]

Post Reply

Return to “mikroC General”