By using this site, you agree to our Privacy Policy and our Terms of Use. Close

Forums - PC - i want to learn how to code....

class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World");
}
}

It's just a basic program to print something on your screen- http://en.wikipedia.org/wiki/Hello_world_program



Around the Network

Or in Dark Basic Pro

Print "Hello, world!"
END

Or, if you want to get advanced and add an IF THEN loop loop:

INT = 1
IF INT PRINT "Hello, World!"
INT = INT + 1
ELSE
END

This will run like this:
Hello, World!
Hello, World!
Hello, World!

And you guys wonder why I like DB Pro so much ;)



@crymetyme

A "hello world" program is a program that all it displays is "hello world" in plain text. This can be either a command line program, or a windows program. Either way, it does 1 thing (prints a string), typically pauses for a keystroke, and exits. I've made one for C, C++, Java, and C#, all while in College.

The reason instructors have you make a hello world program, is so you know the basic resources and lines of code needed to compile the most simple form of program.

@original topic

I agree with NJ5 mostly. If you really want to learn how to code, then learn C, and then go to C++. However, just remember that C++ is not C and don't mix the two together, even if the compiler can handle it, it is bad coding practice. After having to port someone's giant mess of C/C++ code from solaris to unix, to Windows, and then to Windows using Visual Studio, I have sworn to kill anyone who does that again and expects me to port it (note, different compilers handle the C/C++ mix of code differently which is what made this so hard).




If you drop a PS3 right on top of a Wii, it would definitely defeat it. Not so sure about the Xbox360. - mancandy
In the past we played games. In the future we watch games. - Forest-Spirit
11/03/09 Desposit: Mod Bribery (RolStoppable)  vg$ 500.00
06/03/09 Purchase: Moderator Privilege  vg$ -50,000.00

Nordlead Jr. Photo/Video Gallery!!! (Video Added 4/19/10)

bardicverse said:
Or in Dark Basic Pro

Print "Hello, world!"
END

Or, if you want to get advanced and add an IF THEN loop loop:

INT = 3
IF INT > 0
PRINT "Hello, World!"
INT--
ELSE
END

 

I optimized it for you :)

Zero is always in a memory register in the CPU, so it's faster to check a value against 0 then it is any other number (you never have to pass it in from memory). So if you can, always count down.



Try C#

You can write with C# from console applications to web sites and games. You can even write games for XBOX 360.
It's easy and powerful. I like it more then C++ and Java. C++ is the best for some things, but it is hard to program and you need a lot of experience. For some tasks C++ is a pain in the ass. Java is more like C#, but is less flexible IMO.

You don't have any experience with programing language it is not a bad idea to start with good old C and then to move to C++, C# or Java.



Around the Network
OGY said:
ocnkng said:
@OGY
what did you mean by 'java is anal' ?

 

Its poo!

To be serious though, JAVA is a very powerful language, but come the end of the year when my Uni degree is finished I'll will be looking for a job in the games industry and I do not want to make mobile phone games. So in fear of that I express my dislike for JAVA.

I feel Im so prolific in DirectX and OpenGL, i hope I never have to write JAVA again :)

 

You can do OpenGL in Java: http://www.jmonkeyengine.com

 



It seems the mods need help with this forum.  I have zero tolerance for trolling, platform criticism (Rule 4), and poster bad-mouthing (Rule 3.4) and you will be reported.

Review before posting: http://vgchartz.com/forum/rules.php

wow i never knew vgchartz had so many programmers. well, i shouldn't be surprised, really, i mean vgchartz is a video game forum.



TheRealMafoo said:
bardicverse said:
Or in Dark Basic Pro

Print "Hello, world!"
END

Or, if you want to get advanced and add an IF THEN loop loop:

INT = 3
IF INT > 0
PRINT "Hello, World!"
INT--
ELSE
END

 

I optimized it for you :)

Zero is always in a memory register in the CPU, so it's faster to check a value against 0 then it is any other number (you never have to pass it in from memory). So if you can, always count down.

Rockin. Exaclty why I'm not the lead programmer on our dev team. =D My focus is in the audio department, music, sound design. Also do some level design work. =) So it's easier to count down as opposed to up? Never heard that before, good stuff!

 



As a man who uses JAVA a lot in Uni and in work placement last year, don't do it to yourself.

C# is the way forward.



Yes

which programming language should i choose to start with?
C
C#
C++
Java
Python
Ruby
visual Basic


(View Results)

Create a Poll