Workspace_subtract()

Called by the generic function x - y when x and y are of type Workspace.

WORKSPACE_SUBTRACT() w1=Workspace w2=Workspace w1 - w2

Workspace_subtract

The default procedure definition and the calculation of errors for this procedure is shown below. Note that the characteristics of the Left hand workspace are those that define the resultant workspace (ie final length, dimensionality of arrays).

PROCEDURE workspace_subtract; PARAMETERS w1=workspace w2=workspace; RESULT wres

	IF (w1.x = w2.x) AND (w1.xlabel = w2.xlabel)
		wres = w1
		wres.y = w1.y - w2.y
		wres.e = sqrt( w1.e*w1.e + w2.e*w2.e )
	ELSE
		printin "Workspaces are not compatible - please re-bin"
	ENDIF

ENDPROCEDURE