function weight(by, off, output)
	if def(by)
		by = ucase(by);
		if by == "OFF"
			DataWeight();
			if ~(def(output) & (output=="off" | output=="0" | output=="no"))
				print("Weight off.");
			end
		else
			i = GetVarPos(by);
			if (i==0)
				error("Variable '"+by+"' is missing")
			end
			DataWeight(by);
			if ~(def(output) & (output=="off" | output=="0" | output=="no"))
				print("Weight by " + by);
			end
		end
	elseif def(off)
		DataWeight();
		if ~(def(output) & (output=="off" | output=="0" | output=="no"))
			print("Weight off.");
		end
	else
		error("Wrong syntax on 'weight' nor by nor off are specified")
	end
end