`
- 浏览:
2605372 次
- 来自:
深圳
-
ANT arg value 与arg line的区别
Command-line Arguments
Several tasks take arguments that will be passed to another process on the command line. To make it easier to specify arguments that contain space characters, nested arg elements can be used.
Attribute Description Required
value a single command-line argument; can contain space characters. Exactly one of these.
file The name of a file as a single command-line argument; will be replaced with the absolute filename of the file.
path A string that will be treated as a path-like string as a single command-line argument; you can use ; or : as path separators and Ant will convert it to the platform's local conventions.
pathref Reference to a path defined elsewhere. Ant will convert it to the platform's local conventions.
line a space-delimited list of command-line arguments.
It is highly recommended to avoid the line version when possible. Ant will try to split the command line in a way similar to what a (Unix) shell would do, but may create something that is very different from what you expect under some circumstances.
Examples
<arg value="-l -a"/>
is a single command-line argument containing a space character, not separate commands "-l" and "-a".
<arg line="-l -a"/>
This is a command line with two separate arguments, "-l" and "-a".
<arg path="/dir;/dir2:\dir3"/>
is a single command-line argument with the value \dir;\dir2;\dir3 on DOS-based systems and /dir:/dir2:/dir3 on Unix-like systems.
例子
<arg value="-l -a"/>
是一个含有空格的单个的命令行变量。
<arg line="-l -a"/>
是两个空格分隔的命令行变量。
value 一个命令行变量;可包含空格字符。 但是整体的作为一个变量传给程序
line 空格分隔的命令行变量列表。
据我个人的经验,目前为止,还没有必须要用arg value的情况.反而是很多参数需要传进去.这个时候如果用arg value会报错的.所以我一般情况下都是用的arg line
其实value与line没有本质的区别
value无非是把每个参数的意义
更加细化而已
而 line把所有的参数整合成一个而已
从使用来说,使用line出错的概率比较低
分享到:
Global site tag (gtag.js) - Google Analytics
相关推荐
Ant打包jar,参数名变为无意义的arg0,arg1,Java代码提示参数名称无意义 Class not found: org.eclipse.jdt.core.JDTCompilerAdapter 让ant使用Eclipse的打包功能. 使用ant打包的jar,变量变成如下无意义的arg0,arg1. ...
function I = argmin(X, DIM)
matlab开发-ipfarg1arg2arg3arg4。键盘操作的时间序列信号峰值拟合功能。
后来我了解了javac命令和下字节码的知识。分析如下:Ant的debug和debuglevel参数会去调用JDK的javac ...所以,我们用javac -g参数或者用Ant的编译类可以读出方法参数名,而编译接口就不能读出,仍然是arg0,arg1的形式。
Arg_parser 是一个用来处理命令行参数的C++类,同时也提供C语言的版本。
argtable-1.4
该文档包含argis地图开发的一些资料,适合argis地图开发入门者学习,还有argis api for Flex的中文API帮助文档,非常有用
python 出现SyntaxError: non-keyword arg after keyword arg错误解决办法 前言: 在Python中,这两个是python中的可变参数,*arg表示任意多个无名参数,类型为tuple,**kwargs表示关键字参数,为dict,使用时需将...
这项工作回顾了在消除废水处理特别是消毒过程中消除抗生素抗性细菌(ARB)携带基因(ARG)的领域中最新和相关的研究。 传统的消毒技术可能无法有效地使ARB复员,同时将亚致死浓度的ARB和抗生素同时释放到市政污水...
argis9.3 轻松入门系列图书,pdf格式;包括数据。纳米盘地址。
function I = argmax(X, DIM)
Argis 地图标点,画图,点,线,面,椭圆,曲线等返回坐标信息
1)首先在函数里定义一个va_list型的变量,这里是arg_ptr,这个变 量是指向参数的指针. 2)然后用va_start宏初始化变量arg_ptr,这个宏的第二个参数是第 一个可变参数的前一个参数,是一个固定的参数. 3)然后用va_arg返回...
开源项目-alexflint-go-arg.zip,Why have an API for command line flags when you can just do this?
网上找的ae开发类,argis engine教程.zip
arcgis for android 中间点
此外,评估了接受废水的地表水中抗生素抗性细菌(ARB)和抗生素抗性基因(ARG)的发生情况。 从用氯消毒的废水中分离出的FC(71%)观察到的FC对青霉素(P),大肠杆菌素(CT)和氨苄青霉素(AMP)的抵抗力比经UV...
ARGIS---DEM处理流程.docx
资源来自pypi官网。 资源全名:smart-arg-0.0.2.tar.gz
Arg_parser 是一个用来处理命令行参数的C++类,同时也提供C语言的版本。