Skip to content

Instantly share code, notes, and snippets.

@vladdeSV
Last active February 29, 2016 10:14
Show Gist options
  • Save vladdeSV/129948795199fcc366b0 to your computer and use it in GitHub Desktop.
Save vladdeSV/129948795199fcc366b0 to your computer and use it in GitHub Desktop.
No parenthesis might cause unexpected behavior.
import std.stdio;
void main()
{
//Causes function number(int) to be called
number = 4;
//Declare integer number (same name as function)
int number;
//Set integer number to four. This will not call function number(int)
number = 4;
}
void number(int n){
writeln("printed once, ey?");
}
@vladdeSV
Copy link
Author

Outputs: printed once, ey?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment