Skip to content

Instantly share code, notes, and snippets.

@nvasilakis
Created March 3, 2014 19:58
Show Gist options
  • Select an option

  • Save nvasilakis/9333331 to your computer and use it in GitHub Desktop.

Select an option

Save nvasilakis/9333331 to your computer and use it in GitHub Desktop.
A first vala example
// Take for example the following methods:
void method_1(int a, out int b, ref int c) {
//implementation
}
void method_2(Object o, out Object p, ref Object q) {
//implementation
}
// Which are later called with values
int a = 1;
int b;
int c = 3;
method_1(a, out b, ref c);
Object o = new Object();
Object p;
Object q = new Object();
method_2(o, out p, ref q);
// Possible implementation of method1
void method_1(int a, out int b, ref int c) {
b = a + c;
c = 3;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment