Skip to Content
Wir stellen vor: Go
book

Wir stellen vor: Go

by Caleb Doxsey
October 2024
Intermediate to advanced
124 pages
2h 5m
German
O'Reilly Media, Inc.
Content preview from Wir stellen vor: Go

Anhang A. Antworten

Anhang A. Kapitel 1

  1. Der Leerraum ist der Raum zwischen den Zeichen, der aus Leerzeichen, Tabulatoren und Zeilenumbrüchen besteht.

  2. Ein Kommentar ist ein Abschnitt des Codes, der vom Compiler ignoriert wird und als Hinweis für jeden, der den Code liest, verwendet werden kann. Die beiden Arten von Kommentaren sind // (der am Ende der Zeile steht) und /* */.

  3. Die Dateien im Paket fmt würden mit package fmt beginnen.

  4. Um die Funktion Exit aus dem Paket os zu verwenden, musst du das Paket os importieren: import "os" und sie dann mit . aufrufen: os.Exit().

  5. Ändern des Programms, um mit deinem Namen zu drucken:

    package main
    
    import "fmt"
    
    func main() {
        fmt.Println("Hello, my name is Caleb")
    }
    

Anhang A. Kapitel 2

  1. Ganzzahlen werden auf einem Computer mit einem binären Zahlensystem zur Basis 2 gespeichert.

  2. Die größte achtstellige Zahl im Binärformat ist 255.

  3. Programm, das 32.132 × 42.452 berechnet und auf dem Terminal ausgibt:

    package main
    
    import "fmt"
    
    func main() {
        fmt.Println(32132 * 42452)
    }
    
  4. Eine Zeichenkette ist eine Folge von Zeichen. Du kannst die Länge einer Zeichenkette mit der Funktion len (len("a string")) ermitteln.

  5. Der Wert des Ausdrucks ist true.

Anhang A. Kapitel 3

  1. Zwei Möglichkeiten, eine neue Variable zu erstellen, sind: var x = 5 oder x := 5.

  2. Der Wert von x nach dem Ausführen der Gleichung ist 6.

  3. Der Geltungsbereich ist der Bereich, in dem eine Variable verwendet werden kann. Der Gültigkeitsbereich wird in Go lexikalisch mit Hilfe von Blöcken festgelegt, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Produktiv auf der Linux-Kommandozeile

Produktiv auf der Linux-Kommandozeile

Daniel J. Barrett
Grundlagen der Softwareentwicklung

Grundlagen der Softwareentwicklung

Nathaniel Schutta, Dan Vega
Das agentische Unternehmen (German Edition)

Das agentische Unternehmen (German Edition)

Babak Hodjat, Antoine Blondeau

Publisher Resources

ISBN: 9798341604339