Forums

Hi, i'm new to programming...

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

Hi, i'm new to programming...

Postby kslagle1 » Sun Jan 17, 2010 5:27 pm

Hi, my name is Kevin and i'm just starting learning about programming. I am in a college class about it as well. Everyone picks a language to work with and I chose Cobra. Don't ask why, I don't even know. I just felt it was a good choice. Now I am learning that there is no IDE for this language and I am just looking for some pointers on how to get started with it. If I want to start off with the typical, 'Hello World' program, and there is no IDE, how do I make this program work via command line? What compiler do I need and where is that accessed to download? I'm sorry, I know that I am really new at all this, but I want to understand this language and how to operate within it. Thank you for your time and viewing this message. Kevin.
kslagle1
 
Posts: 1

Re: Hi, i'm new to programming...

Postby Charles » Sun Jan 17, 2010 7:05 pm

Hi Kevin,

Welcome to the Cobra community.

Here are instructions for installing Cobra:
http://cobra-language.com/trac/cobra/wiki/HowToInstallFromSource

Here are editors with Cobra support, most of which are free:
http://cobra-language.com/trac/cobra/wiki/EditorSupport

Running a program will be something like:
Code: Select all
cd path\to\program
cobra hello.cobra


Here are a series of "How To" programs:
http://cobra-language.com/how-to/PrintHelloWorld/

But you will find more in your local Cobra directory under the "HowTo".

If you browse through the wiki and these forums, you will find plenty of tips. Plan on alternating between reading and trying things out.

When you have further questions, ask here.

-Chuck
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Hi, i'm new to programming...

Postby hopscc » Wed Jan 20, 2010 1:36 am

Download the compiler/dev system and get it installed.

type
Code: Select all
cobra -help

to see how to drive the compiler

find/write the std helloworld program ( file hello.cobra)

# cobra hello world program
class Hello
def main is shared
print 'hello world'


compile and run it

Code: Select all
cobra hello.cobra


Why do you think the only way to learn/run language source code is via an IDE ?
hopscc
 
Posts: 632
Location: New Plymouth, Taranaki, New Zealand


Return to Discussion

Who is online

Users browsing this forum: No registered users and 14 guests