LARGE PROGRAMS IN MIKROC

General discussion on mikroC.
Post Reply
Author
Message
george
Posts: 5
Joined: 22 Jul 2005 16:09
Location: Australia

LARGE PROGRAMS IN MIKROC

#1 Post by george » 22 Jul 2005 16:18

I have experience in programing Motorola in asembler, and I am starting with MikroC.

I would like to find example of large program organisation. For example, I would like to separate my program in 2-3 files. Is it possible in this C and how?

May I make more than one function in one single file and to call each other and how?... Any examples please :oops:

Charlie
Posts: 2744
Joined: 01 Dec 2004 22:29

#2 Post by Charlie » 22 Jul 2005 23:08

Hi George,

I think the Best way to have a Large Program is to Divide it up into "Moduals".I think the Help has more on this. Take a look at Linkage in the Help.
Regards Charlie M.

george
Posts: 5
Joined: 22 Jul 2005 16:09
Location: Australia

#3 Post by george » 23 Jul 2005 04:23

CharlieM wrote:Hi George,

I think the Best way to have a Large Program is to Divide it up into "Moduals".I think the Help has more on this. Take a look at Linkage in the Help.

Thanks Charlie, but I cant find anything about dividing large programes into modules. Is this option supported by MikroC or this is C only for short programs?

Charlie
Posts: 2744
Joined: 01 Dec 2004 22:29

#4 Post by Charlie » 23 Jul 2005 11:47

HI George,

I called them Moduals,but In MikroC I think the Term is Linkage.If you look in the help of MikroC you will find it.
Regards Charlie M.

pizon
mikroElektronika team
Posts: 823
Joined: 11 Oct 2004 08:53

Re: LARGE PROGRAMS IN MIKROC

#5 Post by pizon » 25 Jul 2005 08:27

MikroC follows the usual C project organization.
  • - Each project can have any number of source files, where functions can be grouped in any way the programmer finds them suitable.
    - Source files are added to project through the <Project -> Add To Project...> menu command; similarly, they are removed from project through <Project -> Remove From Project...> menu command;
    - External function and variable declarations are put into source files through the standard set of preprocessor directives (#include, possibly with #ifdef, #ifndef and #endif). Declarations are automatically available (without preprocessor) for the library files (the ones placed in the ....\Uses\Pxx directories).
pizon

Post Reply

Return to “mikroC General”