Advertisement
cwchen

[Rust] Declaring an array.

Aug 22nd, 2017
731
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rust 0.12 KB | None | 0 0
  1. fn main() {
  2.     const SIZE: usize = 5;
  3.  
  4.     // [0.0, 0.0, 0.0, 0.0, 0.0]
  5.     let mut array: [f64; SIZE] = [0.0; SIZE];
  6. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement