The Cobra Programming Language
How To
Print Hello World
Write Basic Syntax
Use Properties
Make An If Else Ladder
Make A Branch Statement
Declare Inits
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
Pass References To Methods
Translate Pseudo Code To Cobra1
Translate Pseudo Code To Cobra2
Implement IEnumerable1
Implement IEnumerable2
Iterate Through Recursive Data With Yield
Make A Collection Class
Declare Contracts
Threads
Win Forms
GTK
Access MySQL
""" A simple example of creating threads. Note the use 'ref' to refer to a method instead of invoking it. """ use System.Threading class ThreadExample var _maxSeconds = 1.2f var _start as DateTime def run _start = DateTime.now t = Thread(ref .writeB) t.start while not .isFinished print 'a' stop t.join print print 'Finished.' def writeB while not .isFinished print 'b' stop get isFinished as bool return DateTime.now.subtract(_start).totalSeconds >= _maxSeconds def main is shared ThreadExample().run