New to all of this
Posted: Sat Mar 09, 2013 4:26 am
Hello there. I'm kinda new to the programming world, i've tried many different languages, and well, none seemed to flow. I was looking at some of the source code in Cobra and was overjoyed. no semicolon, brackets and what not.
I was looking at the how to and sample pages, and realized these contain things way more advanced than i am at this time. However i can understand this code somewhat but am a bit confused on something and would like to clear it up
"class Hello
def main
print 'Hello, world.'
"
ok so my basic question? here are why is hello given a class, is this necessary or simply good programming habit.
then def main. I'm guessing that this is like in batch scripting where u can basically name bits of code and use it later on but not 100% sure.
also is It _VarName and what is it that start .ThisName
As i hope i will always remember to say thanks in advance, and i hope i don't take anytime away from people really doing something
I was looking at the how to and sample pages, and realized these contain things way more advanced than i am at this time. However i can understand this code somewhat but am a bit confused on something and would like to clear it up
"class Hello
def main
print 'Hello, world.'
"
ok so my basic question? here are why is hello given a class, is this necessary or simply good programming habit.
then def main. I'm guessing that this is like in batch scripting where u can basically name bits of code and use it later on but not 100% sure.
also is It _VarName and what is it that start .ThisName
As i hope i will always remember to say thanks in advance, and i hope i don't take anytime away from people really doing something