The Fabl Manual
Function Index
Class Index
Globals Index
Libraries
Contents

Title Page
Introduction
Sample Code
Architecture
Syntax
Strong Typing
Polymorphism
Operators
Help
Errors
Configuration
RDF
Namespaces
Owl
Datatypes
Resources
Dot ops
Coercion
Type Casting
nil

Types
string
id
int
double
boolean
Literal
Containers
Functions
void

Home
Regarding
The Path
Classes
Delegation
Functional Values
Read/Write
Load/Store
Libraries
Imports
CGI
The Path

Fabl interprets unqualified global and function names (that is, identifiers which do not include ":") by searching a sequence of resources called the path . (The path plays a role in Fabl similar to the role of the path in Unix or Windows shell programming).

The path is of type SeqOf(Resource). The function,

void pathPush(Resource rsr)

is used to add a resource to the path. The variant,

void push(id ns)

is equivalent to pathPush(namespace(ns)). The following example illustrates the use of push

setHome('ex');
var abc = 22;
lastHome();
abc;
--> ERROR: Unknown symbol:abc
//now add ex:home1 to the path
push('ex');
abc;
--> 22

The path is also used for looking up functions.

Each home has its own path property. setHome(x) initializes the path for x if it is not already present. This initial path contains the namespaces fabl and fimp, as well x itself. This means that the classes, properties, and functions making up the Fabl implementation are available without use of qualified names.