Hi guys!
I am trying to solve some hw for couple of days and couldn't..
it is simple
Design and implment the following predicates are required:
(a) add (CurrentSymbolTable, Name, Category, Type, Value, NewSymbolTable) - creates a new symbol table with the name, category, type, and value fields added; if Name
is already in the symbol table, fails
(b) entry (SymbolTable, Name, Category, Type, Value) - returns the category, type and value associated with Name; if Name is not in the symbol table, fails
I started (a) like this
add([],a,b,c,d,[a,b,c,d]).
and this works well.
but no advance...plz help me if you have good ideas about this.
Thanks you
I am trying to solve some hw for couple of days and couldn't..
it is simple
Design and implment the following predicates are required:
(a) add (CurrentSymbolTable, Name, Category, Type, Value, NewSymbolTable) - creates a new symbol table with the name, category, type, and value fields added; if Name
is already in the symbol table, fails
(b) entry (SymbolTable, Name, Category, Type, Value) - returns the category, type and value associated with Name; if Name is not in the symbol table, fails
I started (a) like this
add([],a,b,c,d,[a,b,c,d]).
and this works well.
but no advance...plz help me if you have good ideas about this.
Thanks you