Command Format:
Support two styles: directly pass C++ sentence and parse script.
a:Input C++ sentence directly
dsClient [-h host] expr
b:Parse script and sequently run script line by line.
dsClient [-h host] -f scriptfile
Parameter:
-h host:host is the PC to run debugShell. Default host is to run on local computer.
expr:The C++ sentence to run.
-f script:The script file name to be parsed. Supported syntax refers to script syntax.
The sequence of parameter can not be reversed. If -h host exists, it should be placed in front of expr or -f seciptfile.
Return Value:
There are seven possible return values for dsClient. (After exection, use %errorlevel% in batch file to get return value.
0:Success.
-1: Unhandled exception occurs during execution
-2: Internal error of debugShell.
-3: Syntax error in C++ synax passed to debugShell.
-4: dsClient parameter error.
-5: dsClient intenal error.
-6: Syntax error in script. (This is only for script parse.)
Script Syntax:
As for sentence, script supported syntax is the same as debugShell sentence. The only difference is that script supported sentence must be ended by ';'.
At the meanwhile, script also support if, if-else, for, while, do-while, break, continue. The above sentences’ syntax is the same as C++, except the following items:
1. Script does not support user-defined variables. So loop parameter should use global variable or expression.
2. In if, else, for, do and while, it need {} to include all the sentences. The curly braces can not be ignored. For example, if (0){}else{...}.
3. DebugShell does not support comma expression. So script also does not support it. For example, the sentence for ( i=0, j=0; ; ) is syntax error.