parse
BAP Online Manuals : Library
Reference : Library by Name
: parse
Previous: openwrite
Next: process_name
BAP Online Manuals : Library Reference : Library by Name : parse
Previous: openwrite
Next: process_name
Previous: openwrite
Next: process_name
6.2.95. parse
parses a string
SYNOPSIS
INCLUDE 'iolib.h' parse(Str,Term,VarList)
SYNTAX
parse(Str,Term,VarList) (i,o,o)
ARGUMENTS
string(Str) (i) string to be parsed
void(Term) (o) term that was the result of parsing
void(VarList) (o) Term containing the variables of the term.
DESCRIPTION
Parses the string Str using the current operator declarations. Fails if no valid term is
encountered or it does not match Term. Any Variables contained in Term are listed with
their name in VarList in the following form:
EXAMPLE
parse("3+A",Term,[var(Name,Value)]), write(Name,"="), read(Value), Sum is Term, write(Sum),nl.
ERRORS
No runtime errors.
LAYERS
prolog-process, client-server, object
RELATED PREDICATES
get , readln , readchar , readdevice
BAP Online Manuals : Library Reference : Library by Name : parse
Previous: openwrite
Next: process_name