You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In sublime-text, process never died (more then 1 minute)
In Terminal, window terminal almost crashed
source
typeOrdering=enumLower=-1, Equal=0, Greater=1Eq=concept a
a == a isbool
a /= a isboolOrd=concept o
compareo o isOrdering
o < o isbool
o > o isbool
o <= o isbool
o >= o isboolmax o, o is o
min o, o is o
whenisMainModule:
typeSubClass*=object
real: floatfuncmin(x, y: Ord): Ord {.inline.} =if x <= y: x else: y
funcmax(x, y: Ord): Ord {.inline.} =if y <= x: x else: y
func`>=`(x, y: Ord): bool= x > y and x==y
func`<=`(x, y: Ord): bool= x < y and x==y
func`==`(a, b: SubClass): bool= a.real == b.real
func`>`(a, b: SubClass): bool= a.real > b.real
func`<`(a, b: SubClass): bool= a.real < b.real
funccompare(a, b: SubClass): Ordering=if a < b:
Lowerelif a > b:
Greaterelse:
Equallet
a =SubClass(real: 21)
b=SubClass(real: 23.1)
echo a==b
echocompare(a, b)
echomax(a, b)
command line
nim c foo.nim
Current Output
repeat forever...
version
Nim Compiler Version 1.6.2 [Windows: amd64]
Compiled at 2021-12-17
Copyright (c) 2006-2021 by Andreas Rumpf
active boot switches: -d:release
also test in 1.6.0
The text was updated successfully, but these errors were encountered:
The nim program keeps throwing up errors when I was using sublime-text building source
I was trying
concept
keywordIn nim playground, process was killed
In sublime-text, process never died (more then 1 minute)
In Terminal, window terminal almost crashed
source
command line
nim c foo.nim
Current Output
repeat forever...
version
also test in
1.6.0
The text was updated successfully, but these errors were encountered: