create method

ClipFuncData? create(
  1. String name, [
  2. int topNum = 1
])

Implementation

ClipFuncData? create( String name, [int topNum = 1] ){
	if( _max == 0 ){
		return null;
	}

	if( _num == _max ){
		// 優先度の最も低いユーザー定義関数を削除する
		_del();
	}

	ClipFuncData tmp = _ins( true );

	tmp._info        = ClipFuncInfo();
	tmp._info!._name = name;
	tmp._info!._cnt  = 0;
	tmp._label       = ClipToken();
	tmp._line        = ClipLine();
	tmp._topNum      = topNum;

	_num++;

	return tmp;
}