diff --git a/target/debug/.fingerprint/hello_world-943817d46c044558/bin-test-943817d46c044558 b/target/debug/.fingerprint/hello_world-943817d46c044558/bin-test-943817d46c044558 index 60f06fd..a88d065 100755 --- a/target/debug/.fingerprint/hello_world-943817d46c044558/bin-test-943817d46c044558 +++ b/target/debug/.fingerprint/hello_world-943817d46c044558/bin-test-943817d46c044558 @@ -1 +1 @@ -55aca33b8be45a9e \ No newline at end of file +6d8524286a203399 \ No newline at end of file diff --git a/target/debug/.fingerprint/hello_world-943817d46c044558/bin-test-943817d46c044558.json b/target/debug/.fingerprint/hello_world-943817d46c044558/bin-test-943817d46c044558.json index 45097df..859500c 100755 --- a/target/debug/.fingerprint/hello_world-943817d46c044558/bin-test-943817d46c044558.json +++ b/target/debug/.fingerprint/hello_world-943817d46c044558/bin-test-943817d46c044558.json @@ -1 +1 @@ -{"rustc":9749998217168482212,"target":10994546209011070589,"profile":14528549471338536373,"local":{"variant":"MtimeBased","fields":[[1492003710,242703700],[47,109,101,100,105,97,47,119,105,110,95,101,47,67,108,97,114,97,95,68,97,116,101,110,47,101,116,99,47,80,114,111,103,114,97,109,109,105,101,114,117,110,103,47,82,117,115,116,47,115,114,99,47,116,97,114,103,101,116,47,100,101,98,117,103,47,46,102,105,110,103,101,114,112,114,105,110,116,47,104,101,108,108,111,95,119,111,114,108,100,45,57,52,51,56,49,55,100,52,54,99,48,52,52,53,53,56,47,100,101,112,45,98,105,110,45,116,101,115,116,45,57,52,51,56,49,55,100,52,54,99,48,52,52,53,53,56]]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file +{"rustc":9749998217168482212,"target":10994546209011070589,"profile":14528549471338536373,"local":{"variant":"MtimeBased","fields":[[1492017954,643537700],[47,109,101,100,105,97,47,119,105,110,95,101,47,67,108,97,114,97,95,68,97,116,101,110,47,101,116,99,47,80,114,111,103,114,97,109,109,105,101,114,117,110,103,47,82,117,115,116,47,115,114,99,47,116,97,114,103,101,116,47,100,101,98,117,103,47,46,102,105,110,103,101,114,112,114,105,110,116,47,104,101,108,108,111,95,119,111,114,108,100,45,57,52,51,56,49,55,100,52,54,99,48,52,52,53,53,56,47,100,101,112,45,98,105,110,45,116,101,115,116,45,57,52,51,56,49,55,100,52,54,99,48,52,52,53,53,56]]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/target/debug/deps/test-943817d46c044558 b/target/debug/deps/test-943817d46c044558 index 3c69f59..b6557e0 100755 Binary files a/target/debug/deps/test-943817d46c044558 and b/target/debug/deps/test-943817d46c044558 differ diff --git a/target/debug/test b/target/debug/test index 3c69f59..b6557e0 100755 Binary files a/target/debug/test and b/target/debug/test differ diff --git a/test.rs b/test.rs index 3032cdf..16d31bf 100755 --- a/test.rs +++ b/test.rs @@ -1,9 +1,9 @@ -// my first rust programm +// play & learning with rust // aka "rust playground" // main function fn main() { - println!("Hello world!"); //print to console -> important: here not a tab, but 4 spaces! + } diff --git a/test2/Cargo.lock b/test2/Cargo.lock new file mode 100755 index 0000000..fd4d033 --- /dev/null +++ b/test2/Cargo.lock @@ -0,0 +1,4 @@ +[root] +name = "test2" +version = "0.1.0" + diff --git a/test2/Cargo.toml b/test2/Cargo.toml new file mode 100755 index 0000000..821aafb --- /dev/null +++ b/test2/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "test2" +version = "0.1.0" +authors = ["clara "] + +[dependencies] diff --git a/test2/src/main.rs b/test2/src/main.rs new file mode 100755 index 0000000..59888d8 --- /dev/null +++ b/test2/src/main.rs @@ -0,0 +1,26 @@ +// another rust programm +// let's get started ^.^ + + +use std::io; // use io library from the standard library +// rust only uses few things by default ('prelude') -> add your needs! + + +//main function +fn main() { + println!("guess a number!"); // macro, prints string + + println!("please input your guess!."); // macro, prints string + + let mut guess = String::new(); // let -> create 'variable bindings'; String -> string type (UTF-8 encoded bit of text); '::' -> associate function; 'new()' -> created empty + let foo = 5; // 'foo' is immutable + let mut bar = 5; //'bar' is mutable + + io::stdin().read_line(&mut guess) // calling associated function // without std::io -> written 'std::io::stdin()' //returns handle to standard input + // read_line() -> calling method (like associate function, only on parcticular instant of type) an handle + // read_line():&mut guess -> passing argument to mutable reference of guess + .expect("failed to read line"); // io::Result encodes error handling information // not successful -> panic! with message "failed to read line" + + println!("you guessed: {}", guess); // print out saved string from STDIN + println!("FOO: {} & BAR: {}", foo, bar) // print out string variables +} diff --git a/test2/target/debug/.cargo-lock b/test2/target/debug/.cargo-lock new file mode 100755 index 0000000..e69de29 diff --git a/test2/target/debug/.fingerprint/test2-03d6bc0abf1233dd/bin-test2-03d6bc0abf1233dd b/test2/target/debug/.fingerprint/test2-03d6bc0abf1233dd/bin-test2-03d6bc0abf1233dd new file mode 100755 index 0000000..cbdb5e2 --- /dev/null +++ b/test2/target/debug/.fingerprint/test2-03d6bc0abf1233dd/bin-test2-03d6bc0abf1233dd @@ -0,0 +1 @@ +ab706db4e0a6cc76 \ No newline at end of file diff --git a/test2/target/debug/.fingerprint/test2-03d6bc0abf1233dd/bin-test2-03d6bc0abf1233dd.json b/test2/target/debug/.fingerprint/test2-03d6bc0abf1233dd/bin-test2-03d6bc0abf1233dd.json new file mode 100755 index 0000000..1ecf855 --- /dev/null +++ b/test2/target/debug/.fingerprint/test2-03d6bc0abf1233dd/bin-test2-03d6bc0abf1233dd.json @@ -0,0 +1 @@ +{"rustc":9749998217168482212,"target":11282531132251368481,"profile":14528549471338536373,"local":{"variant":"MtimeBased","fields":[[1492017977,202731800],[47,109,101,100,105,97,47,119,105,110,95,101,47,67,108,97,114,97,95,68,97,116,101,110,47,101,116,99,47,80,114,111,103,114,97,109,109,105,101,114,117,110,103,47,82,117,115,116,47,115,114,99,47,116,101,115,116,50,47,116,97,114,103,101,116,47,100,101,98,117,103,47,46,102,105,110,103,101,114,112,114,105,110,116,47,116,101,115,116,50,45,48,51,100,54,98,99,48,97,98,102,49,50,51,51,100,100,47,100,101,112,45,98,105,110,45,116,101,115,116,50,45,48,51,100,54,98,99,48,97,98,102,49,50,51,51,100,100]]},"features":"None","deps":[],"rustflags":[]} \ No newline at end of file diff --git a/test2/target/debug/.fingerprint/test2-03d6bc0abf1233dd/dep-bin-test2-03d6bc0abf1233dd b/test2/target/debug/.fingerprint/test2-03d6bc0abf1233dd/dep-bin-test2-03d6bc0abf1233dd new file mode 100755 index 0000000..d492eb7 Binary files /dev/null and b/test2/target/debug/.fingerprint/test2-03d6bc0abf1233dd/dep-bin-test2-03d6bc0abf1233dd differ diff --git a/test2/target/debug/deps/test2-03d6bc0abf1233dd b/test2/target/debug/deps/test2-03d6bc0abf1233dd new file mode 100755 index 0000000..bcade0e Binary files /dev/null and b/test2/target/debug/deps/test2-03d6bc0abf1233dd differ diff --git a/test2/target/debug/test2 b/test2/target/debug/test2 new file mode 100755 index 0000000..bcade0e Binary files /dev/null and b/test2/target/debug/test2 differ diff --git a/test2/target/debug/test2.d b/test2/target/debug/test2.d new file mode 100755 index 0000000..c6235ea --- /dev/null +++ b/test2/target/debug/test2.d @@ -0,0 +1 @@ +/media/win_e/Clara_Daten/etc/Programmierung/Rust/src/test2/target/debug/test2: /media/win_e/Clara_Daten/etc/Programmierung/Rust/src/test2/src/main.rs