DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

(guile.info.gz) Read Only Strings

Info Catalog (guile.info.gz) Shared Substrings (guile.info.gz) Shared And Read Only Strings
 
 36.1.2 Read Only Strings
 ------------------------
 
 In previous versions of Guile, there was the idea that some string-based
 primitives such as `string-append' could equally accept symbols as
 arguments.  For example, one could write
 
      (string-append '/home/ 'vigilia)
 
 and get `"/home/vigilia"' as the result.  The term "read only string"
 was adopted to describe the argument type expected by such primitives.
 
    This idea has now been removed.  The predicate `read-only-string?'
 still exists, but deprecated, and is equivalent to
 
      (lambda (x) (or (string? x) (symbol? x)))
 
 But no Guile primitives now use `read-only-string?' to validate their
 arguments.
 
    String-based primitives such as `string-append' now require strings:
 
      (string-append '/home/ 'vigilia)
      =>
      ERROR: Wrong type argument (expecting STRINGP): /home/
 
  -- Deprecated Scheme Procedure: read-only-string? obj
  -- Deprecated C Function: scm_read_only_string_p (obj)
      Return `#t' if OBJ is either a string or a symbol, otherwise
      return `#f'.
 
Info Catalog (guile.info.gz) Shared Substrings (guile.info.gz) Shared And Read Only Strings
automatically generated byinfo2html