Re: Need Help Creating include files.
- Posted by Matt Lewis <matthewwalkerlewis at gmail.com> Feb 25, 2005
- 586 views
Martin Berger wrote: > > Hi all, > > I need to know what I am doing wrong here: > > I created an include file called var.e with the following type definitions. > > -- var.e include file > -- Custom type definitions > > > type POSITIVE(atom x) > return x >= 0 > end type > > type NEGATIVE(atom x) > return x < 0 > end type These need to be declared as global if you want to use them outside of the file in which they are declared.
global type POSITIVE(atom x) return x >= 0 end type global type NEGATIVE(atom x) return x < 0 end type
A type has scope just like a function, and can be called just like a regular function. Matt Lewis