diff --git a/NimWorkspace/Anfang b/NimWorkspace/Anfang deleted file mode 100755 index a1ce698..0000000 Binary files a/NimWorkspace/Anfang and /dev/null differ diff --git a/NimWorkspace/Anfang.nim b/NimWorkspace/Anfang.nim deleted file mode 100644 index 8f72421..0000000 --- a/NimWorkspace/Anfang.nim +++ /dev/null @@ -1,5 +0,0 @@ -var x,y,z :int -x = 10 -y = 25 -z = x + y -echo "sum of ", x, " and ", y, " is ", z \ No newline at end of file diff --git a/NimWorkspace/Prozeduren b/NimWorkspace/Prozeduren deleted file mode 100755 index 62ed02b..0000000 Binary files a/NimWorkspace/Prozeduren and /dev/null differ diff --git a/NimWorkspace/Prozeduren.nim b/NimWorkspace/Prozeduren.nim deleted file mode 100644 index cec0031..0000000 --- a/NimWorkspace/Prozeduren.nim +++ /dev/null @@ -1,37 +0,0 @@ -proc plus(x, y: int): int = x + y -proc multi(x, y: int): int = x * y - -let a = 2 -let b = 3 -let c = 4 - -echo a.plus(b) == plus(a, b) # True -echo c.multi(a) == multi(c, a) # True - -# Verketteter Aufruf -echo a.plus(b).multi(c) # (2 + 3) * 4 = 20 - -# Alternativ -echo multi((a.plus(b)), c) # (2 + 3) * 4 = 20 - - -proc findBiggest(a: seq[int]): int = - # result = 0 - for number in a: - if number > result: - result = number - # Ende der proc - -let d = @[3, -5, 11, 33, 7, -15] -echo findBiggest(d) - -proc toString(x: int): string = - result = if x < 0: "negativ" - elif x > 0: "positiv" - else: "Null" - -proc toString(x: bool): string = - result = if x: "ja" else: " ein" - -echo toString(13) # "positiv" -echo toString(true) # "ja" \ No newline at end of file diff --git a/NimWorkspace/hello b/NimWorkspace/hello deleted file mode 100755 index 02e44e5..0000000 Binary files a/NimWorkspace/hello and /dev/null differ diff --git a/NimWorkspace/hello.nim b/NimWorkspace/hello.nim deleted file mode 100644 index 9273146..0000000 --- a/NimWorkspace/hello.nim +++ /dev/null @@ -1 +0,0 @@ -echo "Hallo Welt" \ No newline at end of file