📄 ejargs.htm
字号:
<html>
<head>
<title>ejArgs -- GoAhead Embedded JavaScript</title>
<link rel="stylesheet" href="../../style/doc.htm" type="text/css">
</head>
<body>
<TABLE border=0 width=100% cellspacing=0 cellpadding=0>
<TR>
<TD class=title-left>ejArgs</TD>
<TD class=title-center><b>GoAhead JavaScript API</b></TD>
<TD class=title-right><B>GoAhead EMF</B></TD>
</TR>
</TABLE>
<HR>
<h2>Synopsis</h2>
<p>Crack the arguments given to an JavaScript script procedure.</p>
<h2>Prototype</h2>
<pre>
#include "ej.h"
int <b>ejArgs</b>(int argc, char_t **argv, char_t *fmt, ...);
</pre>
<h2>Parameters</h2>
<p><table width=90%>
<TR>
<TD width=40>argc
<TD>Number of arguments in argv
<TR>
<TD width=40>argv
<TD> List of arguments
<TR>
<TD width=40>fmt
<TD>Sprintf style format string with %s and %d parameters<tr>
<td width=40 cellpadding = 20>...</td>
<td cellpadding = 20>Pointers to variables to store %s and %d parameters</td>
</tr></table></p>
<h2>Description</h2>
<P style="LEFT: -7798249px; TOP: 503px"> The ejArgv procedure is used by JavaScript procedures to crack their ASP scripting
arguments. It parses the <i>argv</i>parameter and stores the arguments in individual variables
passed to ejArgs. The <EM>fmt</EM> parameter provides a sprintf style argument specification. Only %s and
%d specifiers are supported. </P>
<h2>Return Value</h2>
<p>Returns the number of arguments found in
<EM>args</EM> .</p>
<h2>Example</h2>
<pre>
if (ejArgs(argc, argv, "%s %d", &name, &age) < 2) {
websError(wp, 400, "Insufficient args\n");
return -1;
}
</pre>
<h2>See Also</h2>
<p><A href="../ws/ejscript.htm">JavaScript</A>, <A href="../ws/asp.htm">Active Server Pages</A></p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -