the bes programnin language

Discuss any other topics here
Post Reply
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

the bes programnin language

Post by darksmaster923 »

Herp derp.
User avatar
vrageprogrammer
Posts: 566
Joined: Wed Oct 31, 2007 2:59 pm
Location: On top of a tree
Contact:

Post by vrageprogrammer »

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!
It was not Possible to determine the dimensions of the image....
User avatar
LtForce
Posts: 437
Joined: Wed May 03, 2006 11:15 am
Location: Vilnius, Lithuania

Post by LtForce »

This just looks stupid
User avatar
vrageprogrammer
Posts: 566
Joined: Wed Oct 31, 2007 2:59 pm
Location: On top of a tree
Contact:

Post by vrageprogrammer »

The people who created that software must be joking....
It was not Possible to determine the dimensions of the image....
MakerOfGames
Posts: 866
Joined: Fri Jul 08, 2005 4:27 am
Location: PA, USA

Post by MakerOfGames »

Yeah, its just that simple.

Code: Select all

[Space] [Space] [Tab] [Space] [Tab] [Tab] [LF]...
I prefer

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!");
  }
}
I only know Java, but when this next semester starts up for me I will be learning C++.
Think outside the box.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
User avatar
LtForce
Posts: 437
Joined: Wed May 03, 2006 11:15 am
Location: Vilnius, Lithuania

Post by LtForce »

Nothing beats this:

Code: Select all

#include <iostream> // provides std::cout
 
int main()
{
    std::cout << "Hello, world!\n";
}
This is shortest hello world program available for c++. Not some stupid "Say hello"
MakerOfGames
Posts: 866
Joined: Fri Jul 08, 2005 4:27 am
Location: PA, USA

Post by MakerOfGames »

Mine could be shorter, but I have it print Hello world 5 times... lol I can't wait to learn C++.

[edit]

Code: Select all

//A complete working Java class!
public class HelloWorld
{
  public static void main()
  {
     System.out.println("Hello, world!");
  }
}
Thats the shortest Hello World Program in Java.
[/edit]
Think outside the box.
To go on an adventure, one must discard the comforts and safety of the known and trusted.
Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Post by Jay »

Try to do that on the GBA and you're doomed :wink: (because there is no built-in text font)

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;
}
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:

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;
}
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
Everyone can see the difficult, but only the wise can see the simple.
-----
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

vrageprogrammer 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!
well actually under it is the real code. but you cant see it cuz its just a bunch of tabs and spaces
as i said, its WINNAR
python is most winnar

Code: Select all

print "WASSUP HOME BOI"
Herp derp.
User avatar
vrageprogrammer
Posts: 566
Joined: Wed Oct 31, 2007 2:59 pm
Location: On top of a tree
Contact:

Post by vrageprogrammer »

Er...What is WINNAR?
You mean Winner?
It was not Possible to determine the dimensions of the image....
User avatar
steven8
Posts: 1487
Joined: Wed Aug 24, 2005 9:08 am
Location: Barberton, OH

Post by steven8 »

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.
Steve Dilworth - Resisting change since 1965!
Post Reply