// globals


function calculate () {
	
	options = "";
	if (getValue ("echo")) {
		options += ", echo=TRUE";
		prompt = getValue ("promptecho");
		if (!empty (prompt)) {
			options += ", prompt.echo=\"" + prompt + "\"";
		}
		options += ", max.deparse.length=" + getValue ("maxdeparselength");
		options += ", verbose=" + getValue ("verbose");
	} else {
		options += ", verbose=FALSE";
	}
	options += ", print.eval=" + getValue ("printeval");

echo ('source (file="' + getValue("file") + '", local=' + getValue("local") + options + ', chdir=' + getValue("chdir") + ')\n');
}

function printout () {
	makeHeadercode ("Source R file", array ("File" ,  getValue ("file")));
}


