Calling inherited constructor

Is it possible to call the inherited Constructor from a Subclasses Constructor?

This DOES work, but, note I had to create a helper function called constructBase() which seems round about:

public class Base {
public var num : int = 5;

function Base() {}
function Base(num : int) { 
	this.constructBase(num); 
}	
function constructBase(num : int) {
	this.num = num;
}

}

public class Sub extends Base {
function Sub(num : int) {
super.constructBase(num);
}
function print() {
Debug.Log(this.num);
}
}

This is more along the lines of what I’d expect to be able to do, but this doesn’t work, it will print 5 when creating an instance of the subclass.

public class Base {
public var num : int = 5;

function Base() {}
function Base(num : int) { 
	this.num = num;
}	
function constructBase(num : int) {
	this.num = num;
}

}

public class Sub extends Base {
function Sub(num : int) {
Base(num);
}
function print() {
Debug.Log(this.num);
}
}

Did you try

super(num);  // where 'super' is a reserved word

Sorry, a little more readable:

Does work:

public class Base {
public var num : int = 5;

function Base() {}
function Base(num : int) { 
	this.constructBase(num); 
}	
function constructBase(num : int) {
	this.num = num;
}

}

public class Sub extends Base {
function Sub(num : int) {
	super.constructBase(num);
}
function print() {
	Debug.Log(this.num);
}

}

Does NOT work:

public class Base {
public var num : int = 5;

function Base() {}
function Base(num : int) { 
	this.num = num;
}	
function constructBase(num : int) {
	this.num = num;
}

}

public class Sub extends Base {
function Sub(num : int) {
	Base(num);
}
function print() {
	Debug.Log(this.num);
}

}

Hey that works, thanks!

Is Unity Javascript in fact JScript ? That would be really useful to know!