Code: Select all
int foo(int x, int y, int z = 12){
return x+y+z;
}
Code: Select all
NumOut(0, LCD_LINE1, foo(25, 7));
Code: Select all
NumOut(0, LCD_LINE1, foo(25, 7, 73));
Code: Select all
void txt_out(string text = "Hi!"){
TextOut(0, LCD_LINE1, text);
}
Code: Select all
txt_out(); //Should display "Hi!"
Code: Select all
txt_out("Hello!"); //Should display "Hello!"
Code: Select all
int add(int x, int y, int & d_result){
d_result = (x+y)*2;
return d_result/2;
}
Code: Select all
int Double;
NumOut(0, LCD_LINE1, add(13, 2, Double));//Should display 15
NumOut(0, LCD_LINE2, Double); //Should display 30
Code: Select all
NumOut(0, LCD_LINE1, add(13, 2));