www.delorie.com/gnu/docs/kawa/kawa_70.html   search  
 
Buy GNU books!


Kawa, the Java-based Scheme system

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

10.8.2 Definitions

In addition to define (which can take an optional type specifier), Kawa has some extra definition forms.

Syntax: define-private name [:: type] value
Syntax: define-private (name formals) body
Same as define, except that name is not exported.

Syntax: define-constant name [:: type] value
Definites name to have the given value. The value is readonly, and you cannot assign to it. (This is not fully enforced.) If the definition is at module level, then the compiler will create a final field with the given name and type. The value is evaluated as normal; however, if it is a compile-time constant, it defaults to being static.


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