function [m,b]=gfGlobalFunction(a, varargin)
% gfGlobalFunction class pseudo-constructor
  this_class = 'gfGlobalFunction';
  if (nargin==0) error('cant create an empty global_function reference'); end;
  if (isa(a,this_class)),
    m=a;
  else
    if (isstruct(a) & isfield(a,'id') & isfield(a,'cid'))
      cname = gf_workspace('class name',a);
      if (strcmp(cname, this_class))
	 m = a;
      else
	 m = gf_global_function(a,varargin{:});
      end;
    else
      m = gf_global_function(a,varargin{:});
    end;
    m.txt = '';
    m = class(m, this_class);
  end;
% autogenerated mfile;
