Alan Interactive Fiction
Alan Interactive Fiction Language
Adventure Writing for Everyone
  • Home
  • About
    • News
    • Blog
    • Screenshots
    • Games
    • Links
    • Join!
  • Documentation
    • Getting Setup
      • The Manual (HTML)
      • The Manual (PDF)
      • All published documents
      • Repository on GitHub
    • Samples
    • The Library
      • The Cookbook
      • Beginner's Guide HTML
      • Beginner's Guide - original HTML (historic)
      • AlanIDE intro
      • AlanIDE Guide (pdf)
  • Status
    • Development Status
    • Changes
  • Download
    • Latest Releases
    • Development Kits
    • Interpreters
    • Documentation
    • Library
    • AlanIDE
    • Extensions
    • Utilities
    • Development Snapshots
    • All Downloads
    • Source code
  1. You are here:  
  2. Home
  3. About
  4. Blog
  5. Programming

Designing Your Own Standard Library

We usually think of programming languages and their standard libraries as forming one coherent whole, and for general-purpose languages this might as well be the case. But in text adventure authoring systems the two are more divorced. Often, the language proper has few or no features specific to interactive fiction, and it's the library that makes it into an authoring system, properly speaking. Such is the case with TADS 3, which has recently acquired a new standard library called adv3lite and Inform 6, which has several alternatives, none especially popular.

Details
Written by: Felix Pleşoianu
Category: Programming
Created: 21 January 2014
Last Updated: 22 January 2014

Read more: Designing Your Own Standard Library

Using the standard library

This is a short introduction to the standard library for Alan v3. After reading this brief introduction you will probably want to have a look at the Alan Library Cookbook.

There are four files in the standard library. You should have them in the same folder as your source code file. Then, you can include the library by using the 'import' statement in your source code.

Details
Written by: Anssi Räisänen
Category: Programming
Created: 06 April 2011
Last Updated: 22 December 2014

Read more: Using the standard library

A code sample

Here's a small code snippet, mostly to test automatic Alan source code formatting on the Alan Home site.

The code traverses a set of components of a structure, say a table, and makes each component list its content. 

-- Loop over all components in an instance or class
For Each c In components Of This Do
    "The table has" Say An c. "." List c.
End For.

 

Details
Written by: Administrator
Category: Programming
Created: 25 November 2010
Last Updated: 22 January 2014

Download!

Latest Release 3.0beta8!

Donate!

Help paying for website, certificates and modern development tools!

What they say

"I-F languages are like vehicles ... using Alan is like driving a zippy, easy-handling little electric town car -- it's often all you need to take you where you want to go."

Lelah Conrad

"An easy to learn system with the ability to do some amazing things."

Tom

"Alan definitely met my expectations. I was able to create two pretty large, complex games with no prior programming experience."

Byron Campbell

"If I was to write a new text adventure I wouldn't bother with any other authoring system. Alan is just that much easier."

Felix Pleșoianu

"All those weirdly arranged parentheses, and semi-colons and strange curlicues hanging out in the middle of blank lines. Impossible. But when I looked at Alan I saw the light or, at least, English."

Eric Mayer

"I think its most attractive quality is simplicity, a quality that no other adventure creation language possesses."

Walt Sandsquish

         

Looking for v2?

Alan V2 is very obsolete. Use Alan v3 instead. But you can still visit the obsolete v2 information and downloads here.