Search
 
SCRIPT & CODE EXAMPLE
 

RUST

rust case

    let number = 13;
    match number {
        // Match a single value
        1 => println!("One!"),
        // Match several values
        2 | 3 | 5 | 7 | 11 => println!("This is a prime"),
        // TODO ^ Try adding 13 to the list of prime values
        // Match an inclusive range
        13..=19 => println!("A teen"),
        // Handle the rest of cases
        _ => println!("Ain't special"),
        // TODO ^ Try commenting out this catch-all arm
    }
Comment

PREVIOUS NEXT
Code Example
Rust :: rust get crate version 
Rust :: rust setup in vim 
Rust :: rust .trim() 
Rust :: hello world latex 
Rust :: rust write to file 
Rust :: rust multiline comment 
Rust :: rust copy to clipboard 
Rust :: rust String to &str 
Rust :: rust lang function is never used: rustc(dead_code) 
Rust :: How to print out a variable in rust 
Rust :: get the temp directory rust 
Rust :: rust modulus 
Rust :: sort reverse rust 
Rust :: armanriazi•rust•error•E0277•the size for values of type `str` cannot be known at compilation time 
Rust :: key value in for loop rust 
Rust :: armanriazi•rust•interior-mutability•cell 
Rust :: rust sort vec of f64 
Rust :: armanriazi•rust•error•[E0368]: binary assignment operation `+=` cannot be applied to type `T` 
Rust :: armanriazi•rust•concept•jargon 
Lua :: roblox studio teleport on touch 
Lua :: roblox get humanoid state 
Lua :: roblox get player by name 
Lua :: luau table.find 
Lua :: lua hello world function 
Lua :: Lua numbers 
Lua :: lua string to date 
Lua :: roblox touch part kill script 
Lua :: how to format a number into hh:mm:ss in lua 
Lua :: lua print table as string 
Matlab :: matlab title figure 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =