For the majority of scenarios, specifying project start-up data on the command line is straightforward.
AbsyntaxBatchClient.exe C:\Projects\TwitterSearch.apj /data=Madrid
It is possible that a project requires multiple items of data to be supplied to its entry-point, in which case commas should be used to separate individual data items. The following example shows how to supply data to a project requiring an array of integers at start-up.
AbsyntaxBatchClient.exe C:\Projects\Sort.apj /data=46,-1,999
In this case the string "46,-1,999" is passed to the Batch Client, where it is split into substrings representing the individual data items and converted to the data type required by the target project.
The rules for defining command-line data items are as follows.
-
Commas must be used to separate substrings.
-
Where a comma is to be included in a substring, enclose it in a pair of double-quotes.
-
Where a double-quote is to be included in a substring, it must not abut against a comma that acts as a separator. Thus, to ensure that double-quote pairs do not appear in a substring they must both abut against either the start/end of the string or a comma therein that is not itself enclosed in double-quotes. The lack of a terminating double-quote will result in the last substring terminating with the last character in the string.
-
Null values are denoted by abutting pairs of commas.
-
Empty strings are denoted by abutting pairs of double-quotes that both abut against commas acting as separators or the start/end of the string.
-
White space is not trimmed.
Here are some examples:
Command Line Option
|
Substring Count
|
Substrings
|
Description
|
/Data=
|
1
|
[NULL]
|
One null value.
|
/Data=\"\"
|
1
|
[""]
|
One empty string.
|
/Data=1
|
1
|
["1"]
|
|
/Data=,
|
2
|
[NULL,NULL]
|
Two null values.
|
/Data=,,
|
3
|
[NULL,NULL,NULL]
|
|
/Data=, ,
|
3
|
[NULL," ",NULL]
|
|
/Data=,\"\",
|
3
|
[NULL,"",NULL]
|
|
/Data=,\"\"
|
2
|
[NULL,""]
|
|
/Data=\"
|
1
|
["""]
|
One double-quote character.
|
/Data=1,\"2,3\"
|
2
|
["1","2,3"]
|
|
/Data=\"1,2
|
1
|
[""1,2"]
|
|
/Data=\"1,2\",3
|
2
|
["1,2","3"]
|
|
/Data=The,quick,brown,fox
|
4
|
["The","quick","brown","fox"]
|
|
/Data=The quick brown fox
|
1
|
["The quick brown fox"]
|
|
/Data=The quick,brown fox
|
2
|
["The quick","brown fox"]
|
|
/Data=The quick, brown fox
|
2
|
["The quick"," brown fox"]
|
|