Created
August 1, 2014 15:46
-
-
Save MatejLach/06b5fae72938414ebee4 to your computer and use it in GitHub Desktop.
Example of a global constant in Rust
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static Pi: f64 = 3.14; | |
fn display_pi() { | |
println!("{}", Pi); | |
} | |
fn main() { | |
display_pi() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment