代码大全

(singke) #1
(

CommandSentence: string;
Var Command: COMMAND_TYPE;
Var Error: ERROR_TYPE
);
{Display a readable version of a coded command string
Command strings are of the form "# CA @AT arg1 @AT arg2..."
"#"
"CA"
"@"
"AT" }


Var
Idx: integer;
CommandChar: char
CommandWord: String;
Argument: array[1...MAX_ARGUMENTS]of string;
ArgCount: integer


begin
{ check for valid command}
if((CommandSentence[1]<>COMMAND_SIGN) or
(Length(CommandSentence)<MIN_COMMAND_LENGTH)) then begin
Error:=InvalidCommandString;
exit
end;


{expand the command abbreviation to a meaningful command word}

case CommandSentence[2] of
Free download pdf