| February 2, 2004 | Intro to Ruby | Slide #15 |
| Prev | Next |
Functions are declared with the def keyword:
|
As in Perl, functions automatically return the last statement executed, so that function could be rewritten as
|
Subroutines can be given default values:
|
| Prev | Copyright © 2004 Walter C. Mankowski | Next |