Topic:   a request   (Read 2353 times)


0 Members and 1 Guest are viewing this topic.

Gnome


  • GMG Extraordinaire

  • ***


  • Posts: 1073
a request
« on: May 16, 2009, 02:58:01 PM »
Not a game or anything, but I thought of a good way for people who know both GM and higher level language to post tutorials. You compare the syntax and how to execute certain things of the higher one to GM's.

Like

GM:
x = 5
But on Java its
int x = 0;

I think it would help the rest us very well.
This Cannot be, NOOOOOOOO!!!!

-Gnomes Cry when the McRib was discontinued again.

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: a request
« Reply #1 on: May 16, 2009, 03:41:20 PM »
Oooh. That's brilliant. :) I'll shift this into the Java tutorials.


-Gandolf

Tireas Dragon


  • GMG Extraordinaire

  • ***


  • Posts: 1626

  • Trying to recover from my shattered screen.
Re: a request
« Reply #2 on: May 16, 2009, 04:22:19 PM »
Quote
GM:
x = 5
But on Java its
int x = 0;
Do both of those code lines change x's value to 5? Because java is more strange than I thought possible if they do
I must be dreaming (wake up me wake up) How could this have happened. Tireas' cry when he found his computer fallen over in his chair with it's screen shattered.

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: a request
« Reply #3 on: May 16, 2009, 07:31:06 PM »
Haha, no. Sorry for the confusion.

In Java, you need to declare the variable before you can use it.
Hence:
Code: [Select]
int x;

Here is how it would compare, Gm to Java:
Gm
Code: [Select]
x = 5 
Java
Code: [Select]
int x;
x = 5;
//Or you could simplify it and go as:
int x = 5;


-Gandolf
« Last Edit: May 16, 2009, 07:32:07 PM by Gandolf »

Tireas Dragon


  • GMG Extraordinaire

  • ***


  • Posts: 1626

  • Trying to recover from my shattered screen.
Re: a request
« Reply #4 on: May 16, 2009, 07:58:45 PM »
That makes a whole lot more sense.
I must be dreaming (wake up me wake up) How could this have happened. Tireas' cry when he found his computer fallen over in his chair with it's screen shattered.