Complete conversion to nanoc

This commit is contained in:
flaviut 2014-06-01 02:46:12 -04:00
commit a77ddc8cdf
16 changed files with 48 additions and 4 deletions

View file

@ -1,3 +1,6 @@
---
title: Case Statements
---
# Case Statements
Nimrod also supports case statements, which are like switches in other languages. There are several things to note here:

View file

@ -1 +1,4 @@
---
title: Enums
---
# Enums

View file

@ -1 +1,4 @@
---
title: Exceptions
---
# Exceptions

View file

@ -1,3 +1,6 @@
---
title: If, Else, While, Block
---
# For Loops & Iterators
Nimrod has first class iterators and syntax to use them, for loops. The `continue` and `break` keywords also work inside of for loops. There are two kinds of iterator, and two special methods that for loops work with.

View file

@ -1,3 +1,6 @@
---
title: Getting Started
---
# Getting Started
When installing Nimrod, you have two options: downloading a copy directly from git, or downloading a prepackaged distribution from the website

View file

@ -1,3 +1,6 @@
---
title: Hello World
---
# Hello World
The code for a simple hello world program is as follows:

View file

@ -1,3 +1,7 @@
---
title: If, Else, While, Block
---
# If, Else, While, Block
Nimrod many different control flow constructs, including the standard `if`s, `else`s, and `while`s.

View file

@ -1,3 +1,9 @@
---
title: Main
---
# Nimrod by Example
Nimrod is a powerful statically typed language that allows the programmer expressiveness without compromising run-time performance.
``` nimrod

View file

@ -1,3 +1,6 @@
---
title: Numbers
---
# Numbers
Nimrod has several primitive types:

View file

@ -1,3 +1,6 @@
---
title: Objects
---
# Objects
In Nimrod, objects are like structs from C family languages and define a grouping of fields.

View file

@ -1,5 +1,7 @@
---
title: OOP Macro
---
<!--- Thanks to fowl for creating this page -->
# OOP Macro
This is the code that we currently must write to use OOP in nimrod:
```nimrod

View file

@ -1,4 +1,4 @@
## Summary
## Pages
* [Getting Started](/getting_started/)
* [Hello World](/hello_world/)

View file

@ -1,3 +1,6 @@
---
title: Varargs
---
# Varargs
Standard varargs simply allows you to pass multiple parameters to your function.

View file

@ -1,3 +1,6 @@
---
title: Variables
---
# Variables
Nimrod supports three different types of variables, `let`, `var`, and `const`. As with most things, multiple variables can be declared in the same section.

View file

@ -1,3 +1,6 @@
---
title: Result
---
# Result
The `result` variable is a special variable that serves as an implicit return variable. This is useful because in most cases, the control flow semantics of the `return` statement are unneeded. `result` is initialized with the default value for a given return type, so the following code starts as `0`, before being initialized to `number`:

View file

@ -2,11 +2,10 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>A Brand New nanoc Site - <%= @item[:title] %></title>
<title>Nimrod by Example - <%= @item[:title] %></title>
<link rel="stylesheet" href="<%= @items['/stylesheets/main/'].path %>">
<link rel="stylesheet" href="<%= @items['/stylesheets/syntax/'].path %>">
<!-- you don't need to keep this, but it's cool for stats! -->
<meta name="generator" content="nanoc <%= Nanoc::VERSION %>">
</head>
<body>