Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
6
Task/Documentation/Gri/documentation-1.gri
Normal file
6
Task/Documentation/Gri/documentation-1.gri
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
`My Hello Message'
|
||||
Print a greeting to the user.
|
||||
This is only a short greeting.
|
||||
{
|
||||
show "hello"
|
||||
}
|
||||
1
Task/Documentation/Gri/documentation-2.gri
Normal file
1
Task/Documentation/Gri/documentation-2.gri
Normal file
|
|
@ -0,0 +1 @@
|
|||
help My Hello Message
|
||||
31
Task/Documentation/Nim/documentation.nim
Normal file
31
Task/Documentation/Nim/documentation.nim
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
## Nim directly supports documentation using comments that start with two
|
||||
## hashes (##). To create the documentation run ``nim doc file.nim``.
|
||||
## ``nim doc2 file.nim`` is the same, but run after semantic checking, which
|
||||
## allows it to process macros and output more information.
|
||||
##
|
||||
## These are the comments for the entire module. We can have long descriptions
|
||||
## here. Syntax is reStructuredText. Only exported symbols (*) get
|
||||
## documentation created for them.
|
||||
##
|
||||
## Here comes a code block inside our documentation:
|
||||
##
|
||||
## .. code-block:: nim
|
||||
## var inputStrings : seq[string]
|
||||
## newSeq(inputStrings, 3)
|
||||
## inputStrings[0] = "The fourth"
|
||||
## inputStrings[1] = "assignment"
|
||||
## inputStrings[2] = "would crash"
|
||||
## #inputStrings[3] = "out of bounds"
|
||||
|
||||
type TPerson* = object
|
||||
## This type contains a description of a person
|
||||
name: string
|
||||
age: int
|
||||
|
||||
var numValues*: int ## \
|
||||
## `numValues` stores the number of values
|
||||
|
||||
proc helloWorld*(times: int) =
|
||||
## A useful procedure
|
||||
for i in 1..times:
|
||||
echo "hello world"
|
||||
9
Task/Documentation/Ring/documentation.ring
Normal file
9
Task/Documentation/Ring/documentation.ring
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
Multiply two numbers
|
||||
n1: an integer.
|
||||
n2: an integer.
|
||||
returns product of n1 and n2
|
||||
*/
|
||||
see mult(3, 5) + nl
|
||||
func mult n1, n2
|
||||
return n1*n2
|
||||
9
Task/Documentation/Swift/documentation.swift
Normal file
9
Task/Documentation/Swift/documentation.swift
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
Adds two numbers
|
||||
:param: a an integer.
|
||||
:param: b another integer.
|
||||
:returns: the sum of a and b
|
||||
*/
|
||||
func add(a: Int, b: Int) -> Int {
|
||||
return a + b
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue