title: ERROR:9:42: Syntax error: Operator expected prolog
body: <p>So, I am trying to create a microworld for my prolog assignment and whenever I try to consult the .pl file it gives me a bunch of errors which are basically all the same as they start with &quot;&quot;ERROR:softwares_and_hardwares.pl:9:42: Syntax error: Operator expected&quot;&quot; and in the next line, the same ones with the numbers changed. Can someone help me figure out the error? Please and thank you. Below here is the knowledge base KB code of the following.</p>
  <pre><code>% File: softwares_and_hardwares.pl
  % Line: casualling differentiating on various types of software and hardwares of the computers.
  % ------------------------------------------------------------------------------------
  
  % Predicates based on facts and knowledge  ...
  % ------------------------------------------------------------------------------------
  % software(sfname(S),typeofsf(T),Accesstosrc(A),licensefee(L) :: S is the name of the software where T is determined as which type of software and A as if it the sources is accessible to everyone and L is license fee (if any)
  software(sfname(MacOS),typeofsf(Operating System software),Accesstosrc(No-its Proprietory Software),licensefee(paid-when buying the PC)).
  software(sfname(Linux),typeofsf(Operating System software),Accesstosrc(Yes-its open-source Software),licensefee(free-easily available on internet)).
  software(sfname(Avast Security),typeofsf(Security Application software),Accesstosrc(No-its Proprietory Software),licensefee(paid-subsicrption due after every certain period of time)).
  software(sfname(Mozilla Firefox),typeofsf(Web Application software),Accesstosrc(Yes-its open-source Software),licensefee(free-easily downloadable from the internet)).
  
  % hardware(hdname(H),typeofhd(D),hdtype(P)) :: H is the name of the hardware used in the computers where D is deteremined as which type of hardware and P as if the hardware is an external or internal type of device.
  hardware(hdname(Printer),typeofhd(Output Device),hdtype(external)).
  hardware(hdname(RAM-Random Access Memory),typeofhd(Internal component),hdtype(internal drive)).
  hardware(hdname(Keyboard),typeofhd(Input Device),hdtype(external)).
  hardware(hdname(PCI-Peripheral Component Interconnect aka USB ports),typeofhd(Input Device),hdtype(Internal)).
  
  % Predicates based on Rules (indirectly on the above stated commands)...
  % ------------------------------------------------------------------------------------
  % Rules for listing softwares and hardwares and Computer-components
  %------------------------------------------
  % softwares :: all those items listed are softwares
  softwares :- software(Name,_,_,_), write(Name), nl, fail.
  softwares.
  % hardwares :: all those items listed are hardwares
  hardwares :- hardware(Name,_,_), write(Name), nl, fail.
  hardwares.
  % computer-components :: all those items listed are computer-components
  computer-components :- softwares, hardwares.
  
  % Rules for finding special components of the computer
  %------------------------------------------
  
  % Keyboard(Name) :: Name is a external hardware
  Keyboard(Name) :- hardware(Name,_,hdtype(external)).
  % Linux(Name) :: Name is a operating system software.
  Linux(Name) :- software(Name,typeofsf(Operating System software),_,_).
  % Mozilla Firefox(Name) :: Name is a web application software
  Mozilla Firefox(Name) :- software(Name,typeofsf(Web Application software),_,_).
  % Printer(Name) :: Name is a output device
  Printer(Name) :- hardware(Name,typeofhd(output device),_).
  % MacOS(Name) :: Name is a opertaing system software
  MacOS(Name) :- software(Name,typeofsf(Operating System software),_,_).
  % RAM-Random Access Memory(Name) :: Name is a internal component.
  RAM-Random Access Memory(Name) :- hardware(Name,typeofhd(Internal component),_).
  % Avast Security(Name) :: Name is a security application software
  Avast Security(Name) :- software(Name,typeofsf(Security Application software),_,_).
  % PCI-Peripheral Component Interconnect aka USB ports(Name) :: Name is a internal hardware.
  PCI-Peripheral Component Interconnect aka USB ports(Name) :- hardware(Name,_,hdtype(internal).
  
  %------------------------------------------```
  </code></pre>