【发布时间】:2011-10-17 08:36:04
【问题描述】:
我有一个名为 getFeatures.m 的函数文件,它看起来像:
function [features] getFeatures()
% Import the XPath classes
import javax.xml.xpath.*
% other code
end
function [name] = getName()
% Import the XPath classes
import javax.xml.xpath.*
% other code
end
如您所见,这两个函数都导入 xpath 库,因为我有很多函数需要导入该类,我该如何一次性完成?
【问题讨论】:
-
为什么不把 import 放到函数之外呢?