the bes programnin language
- darksmaster923
- Posts: 1857
- Joined: Wed Jan 03, 2007 10:32 pm
- Location: Huntington Beach, California, USA
- vrageprogrammer
- Posts: 566
- Joined: Wed Oct 31, 2007 2:59 pm
- Location: On top of a tree
- Contact:
- vrageprogrammer
- Posts: 566
- Joined: Wed Oct 31, 2007 2:59 pm
- Location: On top of a tree
- Contact:
-
- Posts: 866
- Joined: Fri Jul 08, 2005 4:27 am
- Location: PA, USA
Yeah, its just that simple.
I prefer
I only know Java, but when this next semester starts up for me I will be learning C++.
Code: Select all
[Space] [Space] [Tab] [Space] [Tab] [Tab] [LF]...
Code: Select all
//A complete working Java class!
public class HelloWorld
{
public static void main(String[]args)
{
int number;
number = 5;
for(int x = 0; x < number; x++)
System.out.println("Hello, world!");
}
}
Think outside the box.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
Nothing beats this:
This is shortest hello world program available for c++. Not some stupid "Say hello"
Code: Select all
#include <iostream> // provides std::cout
int main()
{
std::cout << "Hello, world!\n";
}
-
- Posts: 866
- Joined: Fri Jul 08, 2005 4:27 am
- Location: PA, USA
Mine could be shorter, but I have it print Hello world 5 times... lol I can't wait to learn C++.
[edit]
Thats the shortest Hello World Program in Java.
[/edit]
[edit]
Code: Select all
//A complete working Java class!
public class HelloWorld
{
public static void main()
{
System.out.println("Hello, world!");
}
}
[/edit]
Think outside the box.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
Try to do that on the GBA and you're doomed (because there is no built-in text font)
I will scare you a bit with GameboyAdvance c++ programming now:
MUHUHAHAHAH....
Ok i wouldn't understand it too if it was written in this cryptic binary... But that's how far you can go!
Here is the easy version:
This program just displays a pixel on the screen... Basically i set the video settings of the gba to mode 3 with background 2 enabled and then write a pixel into the video buffer. Since the gba has no running system the pixel will just stay there until the progrm ends / until the gba is shut off.
EDIT: just went to the whitespace site and thought LOL
Te pros of whitespace musthave multiple space-bars on their keyboards to hack their code faster. A hacker duel would go like this:
[ TAB TAB TAB ]
[ TAB ]
[ TAB ]
[TAB TAB TABTABTAB TAB TAB]
Just kidding
I will scare you a bit with GameboyAdvance c++ programming now:
Code: Select all
int main(void)
{
*(unsigned long*)0x4000000=0x3 | 0x400;
*(unsigned short*)0x6000000[28880]=32767;
while(1);
return 0;
}
Ok i wouldn't understand it too if it was written in this cryptic binary... But that's how far you can go!
Here is the easy version:
Code: Select all
#define REG_DISPCNT *(unsigned long*)0x4000000 //video settings register
#define MODE_3 0x3
#define BG2_ENABLE 0x400
#define RGB(r,g,b) (unsigned short)(r + (g << 5) + (b << 10))
unsigned short* videoBuffer = (unsigned short*)0x6000000;
void DrawPixel3(int x, int y, unsigned short c)
{
videoBuffer[y * 240 + x] = c;
}
int main(void)
{
REG_DISPCNT=(MODE_3 | BG2_ENABLE);
DrawPixel3(120,80,RGB(32,32,32));
while(1)
{
;
}
return 0;
}
EDIT: just went to the whitespace site and thought LOL
Te pros of whitespace musthave multiple space-bars on their keyboards to hack their code faster. A hacker duel would go like this:
[ TAB TAB TAB ]
[ TAB ]
[ TAB ]
[TAB TAB TABTABTAB TAB TAB]
Just kidding
Everyone can see the difficult, but only the wise can see the simple.
-----
-----
- darksmaster923
- Posts: 1857
- Joined: Wed Jan 03, 2007 10:32 pm
- Location: Huntington Beach, California, USA
well actually under it is the real code. but you cant see it cuz its just a bunch of tabs and spacesvrageprogrammer wrote:OH MY GOD!
WHAT THE??
Here is a program to input a name and say hello in that program:
"Ask the user for their
name. Then say hello."
LOL!
as i said, its WINNAR
python is most winnar
Code: Select all
print "WASSUP HOME BOI"
Herp derp.
- vrageprogrammer
- Posts: 566
- Joined: Wed Oct 31, 2007 2:59 pm
- Location: On top of a tree
- Contact:
vb:
MsgBox("Hello World")
Creates a window with your projects title as the window text and Hello World as the message in the box, and an OK button as well. All with one line of code.
System.Diagnostics.Process.Start("C:\MyTextFile.txt", "notepad.exe")
One line opens a file in notepad.
MsgBox("Hello World")
Creates a window with your projects title as the window text and Hello World as the message in the box, and an OK button as well. All with one line of code.
System.Diagnostics.Process.Start("C:\MyTextFile.txt", "notepad.exe")
One line opens a file in notepad.
Steve Dilworth - Resisting change since 1965!