Workspace_append()

Called by the generic function x & y (append) when x and y are of type Workspace.

WORKSPACE_APPEND() w1=Workspace w2=Workspace w1 & w2

Workspace_append

The default procedure definition and the calculation of errors for this procedure is shown below.

PROCEDURE workspace_append; PARAMETERS w1=workspace w2=workspace; RESULT wres
LOCAL lenx1 lenx2 leny1 leny2
	lenx1 = length(w1.x)
	lenx2 = length(w2.x)
	leny1 = length(w1.y)
	leny2 = length(w2.y)
	IF (Max(w1.x) = Min(w2.x))
		wres = w1
		wres.x = w1.x & w2.x[2:lenx2]
		wres.y = w1.y & w2.y
		wres.e = w1.e & w2.e
	ELSEIF (leny1 = lenx1) OR (leny2 = lenx2)
		printen "Error - both workspaces must be histograms"
	ELSE
		printen "Error - Start and end X values must match"
	ENDIF

ENDPROCEDURE