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
""" To compile: cobra -c -t:winexe -r:System.Windows.Forms 380-WinForms.cobra To run: winforms Or leave out the "-c" to compile and run in one shot. Recommended reading: Programming Microsoft Windows Forms by Charles Petzold Cobra tips: * Combine enums: AnchorStyle(Left, Right) * Hook up events: listen someObj.someEvent, ref .myMethod """ use System.Windows.Forms class MyForm inherits Form def init .text = 'Click Me' listen .click, ref .handleClick def handleClick(sender as Object, args as EventArgs) MessageBox.show('You clicked me!', 'Click') class Program def main is shared Application.run(MyForm())