diff --git a/tools/website.tmpl b/tools/website.tmpl index 0c059fb87..ff29c160b 100644 --- a/tools/website.tmpl +++ b/tools/website.tmpl @@ -1,23 +1,23 @@ #! stdtmpl | standard #proc generateHTMLPage(c: var TConfigData, currentTab, content, rss: string): string = # result = "" - + -
- -# compute average line length -var - sum = 0 - count = 0 - -for line in stdin.lines: - sum += line.len - count += 1 - -echo("Average line length: ", - if count > 0: sum / count else: 0) --
# create and greet someone -type Person = object - name: string - age: int - -proc greet(p: Person) = - echo "Hi, I'm ", p.name, "." - echo "I am ", p.age, " years old." - -var p = Person(name:"Jon", age:18) -p.greet() # or greet(p) --
# compute average line length +var + sum = 0 + count = 0 + +for line in stdin.lines: + sum += line.len + count += 1 + +echo("Average line length: ", + if count > 0: sum / count else: 0) ++
# create and greet someone +type Person = object + name: string + age: int + +proc greet(p: Person) = + echo "Hi, I'm ", p.name, "." + echo "I am ", p.age, " years old." + +var p = Person(name:"Jon", age:18) +p.greet() # or greet(p) ++