MiniM Overview |
MiniM
Knowledge Base | Oct 7, 2010 How to validate syntax of MUMPS line For syntax validation of line of MUMPS commands MiniM Database Server
implements special function Function check third argument for syntac correctness as this line be a line of MUMPS commands and be a valid argument of the xecute command. Line cannot contain label, dots of argumentless do command and this argumentless do command. If third argument does not contains any syntax error, function returns an empty string. Otherwise function returns string with syntax error and possible extended diagnostic error description. While function works, current process error's context and values of system variables $ecode and $zerror does not changes. For example: USER>w $v("rou","s","s a=123") USER>w $v("rou","s","s a=123aaa") <SYNTAX> :SET: *s a=123aaa To check syntax of selected command's arguments, for example argument of the set command, need to be used concatenation of string to check as an argument and command with one space. For example: USER>s set="a=123" USER>w $v("rou","s","s "_set) MUMPS is a language with late binding, so existence of things are used in line does not checks at the syntax analysis. For example, function does not check existence of local variables, z-function, labels and routines implementation. But syntax analysis cannot find any syntax error. Function to syntax checking check syntax validity only for current MiniM Database Server version. In particular, latest version can supply any other extended functions or language extensions, and function will check syntax for this MiniM version possibility. Eugene Karataevsupport@minimdb.com
|
|
Info Support |