www.delorie.com/gnu/docs/guile/guile_118.html   search  
 
Buy GNU books!


Guile Reference Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

18.2.4.4 Unique Values

The immediate values that are neither small integers, characters, nor booleans are all unique values -- that is, datatypes with only one instance.

Macro: SCM SCM_EOL
The Scheme empty list object, or "End Of List" object, usually written in Scheme as '().

Macro: SCM SCM_EOF_VAL
The Scheme end-of-file value. It has no standard written representation, for obvious reasons.

Macro: SCM SCM_UNSPECIFIED
The value returned by expressions which the Scheme standard says return an "unspecified" value.

This is sort of a weirdly literal way to take things, but the standard read-eval-print loop prints nothing when the expression returns this value, so it's not a bad idea to return this when you can't think of anything else helpful.

Macro: SCM SCM_UNDEFINED
The "undefined" value. Its most important property is that is not equal to any valid Scheme value. This is put to various internal uses by C code interacting with Guile.

For example, when you write a C function that is callable from Scheme and which takes optional arguments, the interpreter passes SCM_UNDEFINED for any arguments you did not receive.

We also use this to mark unbound variables.

Macro: int SCM_UNBNDP (SCM x)
Return true if x is SCM_UNDEFINED. Apply this to a symbol's value to see if it has a binding as a global variable.


  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003