Thread: Gs3
View Single Post
  #24  
Old 04-13-2013, 02:57 AM
Gos_pira Gos_pira is offline
Registered Pirate Ghost
Gos_pira's Avatar
Join Date: Sep 2009
Location: Pirate Ghost Ship
Posts: 175
Gos_pira is a splendid one to beholdGos_pira is a splendid one to beholdGos_pira is a splendid one to beholdGos_pira is a splendid one to beholdGos_pira is a splendid one to behold
Quote:
Originally Posted by fowlplay4 View Post
Personally prefer the Java-style of declaring variables/types than your current GS3 way, no need to carry over how we currently use temp to GS3 as it just adds unnecessary code.

type variable;

Being able to create global functions would be cool too, I imagine GS3 would be more flexible in some way that we can modify built-in functions?

I.e.

PHP Code:
class Options extends TGraalVar 
  
int age;
  
string gender;
  
string city;
}

function 
void saveOptions() { 
  
Options options = new Options(); 
  
options.age 24
  
options.gender "female"
  
options.city "Dallas"
  
options.savevars("options.txt"0); 
}

function 
number addNumbers(number anumber b) {
  return 
b;

I'd personally prefer:

PHP Code:
public class Options TGraalVar 

  
int age;
  
string gender;
  
string city;
}

public class 
Npc
{
    public 
void saveOptions()
    { 
        
Options options = new Options(); 
        
options.age 24
        
options.gender "female"
        
options.city "Dallas"
        
options.savevars("options.txt"0); 
    }

    public 
float addNumbers(float afloat b)
    {
        return 
b;
    }

Reply With Quote