Skip to content

Releases: crossoverJie/gscript

v0.0.12

08 Nov 07:57
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.0.11...v0.0.12

v0.0.11

15 Oct 07:37
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.0.10...v0.0.11

v0.0.10

06 Oct 03:07
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.0.9...v0.0.10

  • Runtime msg
  • New System/DateTime API
class DateTime{
    string getCurrentTime(string tz, string layout){
        return GetCurrentTime(tz, layout);
    }
    int unix(string tz){
        return Unix(tz);
    }
}

// system os api
class System{

    // Get os args.
    string[] getOSArgs(){
        return GetOSArgs();
    }
    string command(string name, string ...arg){
        return Command(name, arg);
    }
    // attention: perm is the decimal
    writeFile(string fileName, string value, int perm){
        WriteFile(fileName, value, perm);
    }
    // removes the named file
    remove(string fileName){
        Remove(fileName);
    }
}

v0.0.9

26 Sep 05:42
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.0.8...v0.0.9

example: print_triangle.gs

int num(int x,int y){
	if (y==1 || y ==x) {
		return 1;
	}
    int v1 = num(x - 1, y - 1);
    int v2 = num(x - 1, y);
	int c = v1+v2;
    // int c = num(x - 1, y - 1)+num(x - 1, y);
	return c;
}

printTriangle(int row){
	for (int i = 1; i <= row; i++) {
        for (int j = 1; j <= row - i; j++) {
           print(" ");
        }
        for (int j = 1; j <= i; j++) {
            print(num(i, j) + " ");
        }
        println("");
    }
}

printTriangle(7);
      1 
     1 1 
    1 2 1 
   1 3 3 1 
  1 4 6 4 1 
 1 5 10 10 5 1 
1 6 15 20 15 6 1

v0.0.8

13 Sep 13:25
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.0.7...v0.0.8

v0.0.7

08 Sep 15:10
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.0.6...v0.0.7

v0.0.6

05 Sep 18:07
Compare
Choose a tag to compare
  • Class
  • Primitive(int/string/float/bool)
  • nil type
  • Standard lib: array/Map
  • Closure