1
0
Fork 0
cl-sites/guile.html_node/Common-Feature-Symbols.html

221 lines
10 KiB
HTML
Raw Normal View History

2024-12-17 12:49:28 +01:00
<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- This manual documents Guile version 3.0.10.
Copyright (C) 1996-1997, 2000-2005, 2009-2023 Free Software Foundation,
Inc.
Copyright (C) 2021 Maxime Devos
Copyright (C) 2024 Tomas Volf
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License." -->
<title>Common Feature Symbols (Guile Reference Manual)</title>
<meta name="description" content="Common Feature Symbols (Guile Reference Manual)">
<meta name="keywords" content="Common Feature Symbols (Guile Reference Manual)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content=".texi2any-real">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link href="index.html" rel="start" title="Top">
<link href="Concept-Index.html" rel="index" title="Concept Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Feature-Tracking.html" rel="up" title="Feature Tracking">
<link href="Feature-Manipulation.html" rel="prev" title="Feature Manipulation">
<style type="text/css">
<!--
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
span:hover a.copiable-link {visibility: visible}
-->
</style>
<link rel="stylesheet" type="text/css" href="https://www.gnu.org/software/gnulib/manual.css">
</head>
<body lang="en">
<div class="subsubsection-level-extent" id="Common-Feature-Symbols">
<div class="nav-panel">
<p>
Previous: <a href="Feature-Manipulation.html" accesskey="p" rel="prev">Feature Manipulation</a>, Up: <a href="Feature-Tracking.html" accesskey="u" rel="up">Feature Tracking</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<h4 class="subsubsection" id="Common-Feature-Symbols-1"><span>6.23.2.2 Common Feature Symbols<a class="copiable-link" href="#Common-Feature-Symbols-1"> &para;</a></span></h4>
<p>In general, a particular feature may be available for one of two
reasons. Either because the Guile library was configured and compiled
with that feature enabled &mdash; i.e. the feature is built into the library
on your system. Or because some C or Scheme code that was dynamically
loaded by Guile has added that feature to the list.
</p>
<p>In the first category, here are the features that the current version of
Guile may define (depending on how it is built), and what they mean.
</p>
<dl class="table">
<dt><code class="code">array</code></dt>
<dd><p>Indicates support for arrays (see <a class="pxref" href="Arrays.html">Arrays</a>).
</p>
</dd>
<dt><code class="code">array-for-each</code></dt>
<dd><p>Indicates availability of <code class="code">array-for-each</code> and other array mapping
procedures (see <a class="pxref" href="Arrays.html">Arrays</a>).
</p>
</dd>
<dt><code class="code">char-ready?</code></dt>
<dd><p>Indicates that the <code class="code">char-ready?</code> function is available
(see <a class="pxref" href="Venerable-Port-Interfaces.html">Venerable Port Interfaces</a>).
</p>
</dd>
<dt><code class="code">complex</code></dt>
<dd><p>Indicates support for complex numbers.
</p>
</dd>
<dt><code class="code">current-time</code></dt>
<dd><p>Indicates availability of time-related functions: <code class="code">times</code>,
<code class="code">get-internal-run-time</code> and so on (see <a class="pxref" href="Time.html">Time</a>).
</p>
</dd>
<dt><code class="code">debug-extensions</code></dt>
<dd><p>Indicates that the debugging evaluator is available, together with the
options for controlling it.
</p>
</dd>
<dt><code class="code">delay</code></dt>
<dd><p>Indicates support for promises (see <a class="pxref" href="Delayed-Evaluation.html">Delayed Evaluation</a>).
</p>
</dd>
<dt><code class="code">EIDs</code></dt>
<dd><p>Indicates that the <code class="code">geteuid</code> and <code class="code">getegid</code> really return
effective user and group IDs (see <a class="pxref" href="Processes.html">Processes</a>).
</p>
</dd>
<dt><code class="code">inexact</code></dt>
<dd><p>Indicates support for inexact numbers.
</p>
</dd>
<dt><code class="code">i/o-extensions</code></dt>
<dd><p>Indicates availability of the following extended I/O procedures:
<code class="code">ftell</code>, <code class="code">redirect-port</code>, <code class="code">dup-&gt;fdes</code>, <code class="code">dup2</code>,
<code class="code">fileno</code>, <code class="code">isatty?</code>, <code class="code">fdopen</code>,
<code class="code">primitive-move-&gt;fdes</code> and <code class="code">fdes-&gt;ports</code> (see <a class="pxref" href="Ports-and-File-Descriptors.html">Ports and File Descriptors</a>).
</p>
</dd>
<dt><code class="code">net-db</code></dt>
<dd><p>Indicates availability of network database functions:
<code class="code">scm_gethost</code>, <code class="code">scm_getnet</code>, <code class="code">scm_getproto</code>,
<code class="code">scm_getserv</code>, <code class="code">scm_sethost</code>, <code class="code">scm_setnet</code>, <code class="code">scm_setproto</code>,
<code class="code">scm_setserv</code>, and their &lsquo;byXXX&rsquo; variants (see <a class="pxref" href="Network-Databases.html">Network Databases</a>).
</p>
</dd>
<dt><code class="code">posix</code></dt>
<dd><p>Indicates support for POSIX functions: <code class="code">pipe</code>, <code class="code">getgroups</code>,
<code class="code">kill</code>, <code class="code">execl</code> and so on (see <a class="pxref" href="POSIX.html"><abbr class="acronym">POSIX</abbr> System Calls and Networking</a>).
</p>
</dd>
<dt><code class="code">fork</code></dt>
<dd><p>Indicates support for the POSIX <code class="code">fork</code> function (see <a class="pxref" href="Processes.html"><code class="code">primitive-fork</code></a>).
</p>
</dd>
<dt><code class="code">popen</code></dt>
<dd><p>Indicates support for <code class="code">open-pipe</code> in the <code class="code">(ice-9 popen)</code>
module (see <a class="pxref" href="Pipes.html">Pipes</a>).
</p>
</dd>
<dt><code class="code">random</code></dt>
<dd><p>Indicates availability of random number generation functions:
<code class="code">random</code>, <code class="code">copy-random-state</code>, <code class="code">random-uniform</code> and so on
(see <a class="pxref" href="Random.html">Random Number Generation</a>).
</p>
</dd>
<dt><code class="code">reckless</code></dt>
<dd><p>Indicates that Guile was built with important checks omitted &mdash; you
should never see this!
</p>
</dd>
<dt><code class="code">regex</code></dt>
<dd><p>Indicates support for POSIX regular expressions using
<code class="code">make-regexp</code>, <code class="code">regexp-exec</code> and friends (see <a class="pxref" href="Regexp-Functions.html">Regexp Functions</a>).
</p>
</dd>
<dt><code class="code">socket</code></dt>
<dd><p>Indicates availability of socket-related functions: <code class="code">socket</code>,
<code class="code">bind</code>, <code class="code">connect</code> and so on (see <a class="pxref" href="Network-Sockets-and-Communication.html">Network Sockets and Communication</a>).
</p>
</dd>
<dt><code class="code">sort</code></dt>
<dd><p>Indicates availability of sorting and merging functions
(see <a class="pxref" href="Sorting.html">Sorting</a>).
</p>
</dd>
<dt><code class="code">system</code></dt>
<dd><p>Indicates that the <code class="code">system</code> function is available
(see <a class="pxref" href="Processes.html">Processes</a>).
</p>
</dd>
<dt><code class="code">threads</code></dt>
<dd><p>Indicates support for multithreading (see <a class="pxref" href="Threads.html">Threads</a>).
</p>
</dd>
<dt><code class="code">values</code></dt>
<dd><p>Indicates support for multiple return values using <code class="code">values</code> and
<code class="code">call-with-values</code> (see <a class="pxref" href="Multiple-Values.html">Returning and Accepting Multiple Values</a>).
</p></dd>
</dl>
<p>Available features in the second category depend, by definition, on what
additional code your Guile process has loaded in. The following table
lists features that you might encounter for this reason.
</p>
<dl class="table">
<dt><code class="code">defmacro</code></dt>
<dd><p>Indicates that the <code class="code">defmacro</code> macro is available (see <a class="pxref" href="Macros.html">Macros</a>).
</p>
</dd>
<dt><code class="code">describe</code></dt>
<dd><p>Indicates that the <code class="code">(oop goops describe)</code> module has been loaded,
which provides a procedure for describing the contents of GOOPS
instances.
</p>
</dd>
<dt><code class="code">readline</code></dt>
<dd><p>Indicates that Guile has loaded in Readline support, for command line
editing (see <a class="pxref" href="Readline-Support.html">Readline Support</a>).
</p>
</dd>
<dt><code class="code">record</code></dt>
<dd><p>Indicates support for record definition using <code class="code">make-record-type</code>
and friends (see <a class="pxref" href="Records.html">Records</a>).
</p></dd>
</dl>
<p>Although these tables may seem exhaustive, it is probably unwise in
practice to rely on them, as the correspondences between feature symbols
and available procedures/behavior are not strictly defined. If you are
writing code that needs to check for the existence of some procedure, it
is probably safer to do so directly using the <code class="code">defined?</code> procedure
than to test for the corresponding feature using <code class="code">provided?</code>.
</p>
</div>
<hr>
<div class="nav-panel">
<p>
Previous: <a href="Feature-Manipulation.html">Feature Manipulation</a>, Up: <a href="Feature-Tracking.html">Feature Tracking</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
</div>
</body>
</html>