Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUST

rust const string

// construction:
//      const name : type = value
fn main() {
    const TEXT : &str = "Hallo Welt!";
    // little test
    print!("{}", TEXT);
}
// Important to know:
// The type must be specified, because alternatively an error occurs when compiling.
 
PREVIOUS NEXT
Tagged: #rust #const #string
ADD COMMENT
Topic
Name
1+8 =