Facts are a feature of a declarative language - Scottish Highers Computing Science - Question 3 - 2018
Question 3
Facts are a feature of a declarative language. An example is shown below:
sibling(fred, senga).
Name and describe one other feature of a declarative language.
Worked Solution & Example Answer:Facts are a feature of a declarative language - Scottish Highers Computing Science - Question 3 - 2018
Step 1
Rules
96%
114 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
One feature of a declarative language is 'Rules'. Rules allow for the definition of relationships and constraints based on facts.
Use of Variables: Rules can incorporate variables that make them dynamic and applicable to various situations.
Reduction of Repetition: They help in minimizing repetitive code by establishing general patterns or relationships.
Information Addition: Rules can add additional meaning by combining facts and providing more complex outputs.
Relationships: Rules help in establishing meaningful relationships between different facts.
Recursion: They can implement recursive definitions, allowing structures to be represented in a more compact form.
Join the Scottish Highers students using SimpleStudy...