Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Function with Parameter.c
- Version 0.94 for use with SimpleIDE 9.40 and its Simple Libraries
- Call a function that displays a value passed to it with a parameter.
- http://learn.parallax.com/propeller-c-functions/function-parameter
- */
- #include "simpletools.h" // Include simpletools
- void counter(int startVal, int endVal, int incVal); // Function prototype
- int main() // main function
- {
- for(int i = startVal; i <= endVal; i = i + incVal)
- {
- counter(0, 8, 2);
- }
- }
- void counter(int startVal, int endVal, int incVal) // value function
- {
- print("StartVal = %d\n", startVal); // Display a single value
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement