Coder Social home page Coder Social logo

Codeblöcke Ch-13-01 about rustbook-de HOT 2 CLOSED

geri1701 avatar geri1701 commented on August 15, 2024
Codeblöcke Ch-13-01

from rustbook-de.

Comments (2)

geri1701 avatar geri1701 commented on August 15, 2024 1

Danke! Alles klar, werde das korrigieren und in Zukunft gleich korrekt auskommentiert und übersetzt einfügen.

from rustbook-de.

damoasda avatar damoasda commented on August 15, 2024

Beispiel:
In Listing 13-2 gibst du folgendes an:

# use std::thread;
# use std::time::Duration;
#
# fn simulated_expensive_calculation(intensity: u32) -> u32 {
#     println!("rechnet langsam ...");
#     thread::sleep(Duration::from_secs(2));
#     intensity
# }
#
# fn generate_workout(intensity: u32, random_number: u32) {}
#
fn main() {
    let simulated_user_specified_value = 10;
    let simulated_random_number = 7;

    generate_workout(simulated_user_specified_value, simulated_random_number);
}

Die Kommentarzeichen # am Zeilenanfang sorgen dafür, dass mdbook diese Zeilen initial ausblendet, beim Kompilieren aber trotzdem vorhanden sind.

Bitte beachte, dass auch die Programmausgaben übersetzt sind, wie hier "rechnet langsam".

from rustbook-de.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.