2 note this is not called get as it performs

This preview shows page 381 - 384 out of 445 pages.

2 Note this is not called ‘get ’ as it performs unification and can perfectly well instantiate the argument. SWI-Prolog 6.2 Reference Manual
Image of page 381

Subscribe to view the full document.

380 APPENDIX A. THE SWI-PROLOG LIBRARY set h name i of h constructor i (+Value, !Record) Destructively replace the argument h name i in Record by Value based on setarg/3 . Use with care. nb set h name i of h constructor i (+Value, !Record) As above, but using non-backtrackable assignment based on nb setarg/3 . Use with extreme care. set h constructor i fields(+Fields, +Record0, -Record) Set multiple fields using the same syntax as make h constructor i /2, but starting with Record0 rather than the default record. set h constructor i fields(+Fields, +Record0, -Record, -RestFields) Similar to set h constructor i fields/4, but fields not defined by h constructor i are returned in RestFields . set h constructor i field(+Field, +Record0, -Record) Set a single field specified as a term h name i ( h value i ). record( +Spec ) The construct :- record Spec, ... is used to define access to named fields in a com- pound. It is subject to term-expansion (see expand term/2 ) and cannot be called as a predicate. See section A.25 for details. A.26 library(registry): Manipulating the Windows registry The registry is only available on the MS-Windows version of SWI-Prolog. It loads the foreign extension plregtry.dll , providing the predicates described below. This library only makes the most common operations on the registry available through the Prolog user. The underlying DLL provides a more complete coverage of the Windows registry API. Please consult the sources in pl/ src/win32/foreign/plregtry.c for further details. In all these predicates, Path refers to a ‘/’ separated path into the registry. This is not an atom containing ‘/’-characters as used for filenames, but a term using the functor //2 . Windows defines the following roots for the registry: classes root , current user , local machine and users . registry get key( +Path, -Value ) Get the principal (default) value associated to this key. Fails silently if the key does not exist. registry get key( +Path, +Name, -Value ) Get a named value associated to this key. registry set key( +Path, +Value ) Set the principal (default) value of this key. Creates (a path to) the key if it does not already exist. registry set key( +Path, +Name, +Value ) Associate a named value to this key. Creates (a path to) the key if it does not already exist. registry delete key( +Path ) Delete the indicated key. SWI-Prolog 6.2 Reference Manual
Image of page 382
A.27. LIBRARY(SIMPLEX): SOLVE LINEAR PROGRAMMING PROBLEMS 381 shell register file type( +Ext, +Type, +Name, +OpenAction ) Register a file-type. Ext is the extension to associate. Type is the type name, often something like prolog.type . Name is the name visible in the Windows file-type browser. Finally, OpenAction defines the action to execute when a file with this extension is opened in the Windows explorer.
Image of page 383

Subscribe to view the full document.

Image of page 384
  • Spring '17
  • Shen Zhiqi

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern