SPC  Version 0.9.5
 All Files Functions Groups Pages
The inline keyword

You can optionally mark SPC functions as inline functions.

This means that each call to the function will create another copy of the function's code. Unless used judiciously, inline functions can lead to excessive code size.

If a function is not marked as inline then an actual SuperPro subroutine is created and the call to the function in SPC code will result in a subroutine call to the SuperPro subroutine. The total number of non-inline functions (aka subroutines) and tasks must not exceed 256.

The code example below shows how you can use the inline keyword to make a function emit its code at the point where it is called rather than requiring a subroutine call.

inline void foo(int value)
task main()

In this case task main will contain 4 Wait calls rather than 4 calls to the foo subroutine since it was expanded inline.