-1

Language : C Environment : bare-metal

This program have many sub-modules. I hope in the functions of each sub-module can't not be visible/used by other sub-modules except that the functions are the API functions. If the sub-modules only contains single file, the simplest way is using static function except the API functions. However, how is that work for multi-functions sub-modules?

BenMorel
  • 34,448
  • 50
  • 182
  • 322
  • 2
    If you're asking whether you can have multiple `static` functions in each linkable object module, the answer is *yes*. If that is not the root of your question, you may want to consider rewording it to better drive the *problem* you're trying to solve. – WhozCraig Aug 05 '13 at 02:31

1 Answers1

0

If talking C a module is a translation unit is a file. Concluding from this backward there are no modules consisting of more then one file in C.

So to answer your question: You cannot have a static function being made accessable by more then one file.

alk
  • 69,737
  • 10
  • 105
  • 255