How To Declare Variable Number Of Args
Print Hello World
Write Basic Syntax
Use Properties
Make An If Else Ladder
Make A Branch Statement
Declare Inits
Use Lists
Use Arrays
Make A Class Hierarchy
Use Nil And Nilable Types
Use Dynamic Typing
Declare Variable Number Of Args
Read And Write Files
Check Inheritance And Implementation
Customize Object Equality
Pass References To Methods
Translate Pseudo Code To Cobra 1
Translate Pseudo Code To Cobra 2
Implement IEnumerable 1
Implement IEnumerable 2
Iterate Through Recursive Data With Yield
Make A Collection Class
Declare Contracts
Threads
Win Forms
WPF
GTK
Qyoto
Access MySQL
XNA
Open TK
 
"""
How to declare and use variable number of arguments:

    * Put the `vari` keyword before the type of the argument.
    * Use a `for` loop to enumerate through them.

You don't need to specify the type of the variable in the `for` loop. Cobra
infers that from what is being enumerated.

Also the var args are compatible with IEnumerable<of T> and IEnumerable.
So you can pass the argument wherever those types are expected.
"""


class Test

    def allTrue(stuff as vari dynamic?) as bool
        """ Returns true only if all the stuff passed in is true. """
        for x in stuff, if not x, return false
        return true

    def sumInts(stuff as vari int) as int
        """ Return the sum of all the ints. """
        sum = 0
        for x in stuff, sum += x
        return sum

    def main
        t = Test()
        assert t.allTrue(1, 3.0, true)
        assert not t.allTrue(1, 0, true)
        assert t.sumInts(1, 2, 3)==6