Workspace_add()

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

WORKSPACE_ADD() w1=Workspace w2=Workspace w1 + w2

Workspace_add

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_add; 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
		printen "Workspaces are not compatible - please re-bin"
	ENDIF

ENDPROCEDURE