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 value(int a); // Function prototype
- void two_values(int a, int b);
- int main() // main function
- {
- value(6); // Call value function
- two_values(25, 55);
- }
- void value(int a) // value function
- {
- print("The value is: a = %d\n", a); // Display a single value
- }
- void two_values(int a, int b)
- {
- print("Two values are: ");
- print("a = %d, b = %d\n", a, b);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement