Tutorials (basic syntax)
You can define in C-style string by enclosing the string in double quotes (").
- If you want to put a double quotation in a string, you need to put \" in the string.
- \" and \r and \n, \\ are the same way as C.
You can define in BASIC-style string by enclosing the string in single quotes (').
- If you want to put a single quotation in a string, you need to put '' in the string.
If a string contains new line, it is valid.
FROM tab "
A variable name has to start dollar $ sign.
Predicate(Like calling a function)
Predicate is the ADP assessment unit.Write the following.
Strings and numbers, variables and predicate are called term.
Goal cluase（Like a function body parts）
Goal cluase has terms separated by commas "," and terminated by a semicolon ";".
Goal clause is evaluated in the description of the order of source files by adp command.
You input the source file above to adp command, then the command 'Hello World' on the screen.
Horn clause（Like a function definition）
Horn clause has a horn head and a goal cluase. The horn head begins from a "+" charactor and has horn_clause_name and argment lists.
+horn_name($x,$y),print($x, '=', $y);
A comment begins from a '#' character and ends to the end of the line.
,printn("Hello World"); # Here is a comment.
Powered by ADP.