top of page
Suche

Print | Swift Tutorial | Hello World

  • Autorenbild: Octopus
    Octopus
  • 2. Jan. 2021
  • 1 Min. Lesezeit

Aktualisiert: 10. Jan. 2021



Mit der Funktion print() kann man Inhalte auf der Konsole ausgeben. Dies ist besonders Hilfreich bei der Fehlersuche, dem sogenannten Debugging. In der Konsole können Zeichenketten, Zahlen oder auch Kombinationen von Zahlen und Zeichenketten ausgegeben werden.


Strings "Hello World" in der Konsole ausgeben

print("Hello World")

Output: Hello World

Zahlen in der Konsole ausgeben

print(1)

Output: 1

Variablen in der Konsole ausgeben

var text = "Ergebnis"
print(text)

Output: Ergebnis

Mehrere Variablen in der Konsole ausgeben

var text = "Ergebnis"
var zahl = 1
print(text, zahl)

Output: Ergebnis 1

Berechnungen in der Konsole ausgeben

var text = "Ergebnis"
var zahl = 1
var zahl2 = 2
print(text, zahl + zahl2)

Output: Ergebnis 3

Du liest: Print | Swift Tutorial | Hello World


1 Kommentar


Serg Zorg
Serg Zorg
28. Sept.

The Famous fonts instantly add sophistication to a project – I used famous fonts for a logo concept and they gave it a timeless feel. On the other hand, the Fat fonts are bold and playful, great for posters or ads where you want something eye-catching. I think both categories have their charm: one is elegant and classy, the other fun and loud. Depending on what mood you want to create, these fonts can really help you stand out.

Gefällt mir
bottom of page