Interface sfiInterface


public interface sfiInterface

SFI Interface
Description:
That's an interface to Java™ defined words.

Example:

     public interpreter()
    {
        addSystemWord("RANDOM", new sfiInterface() {
            public boolean execWord() {
                return execWordRANDOM();
            }
        });
    }

    public boolean execWordRANDOM() {
        if(isStackEmpty())
        {
            error("the stack is empty");
            return false;
        }

        int value=stackPop();

        stackPush((int)(java.lang.Math.random()*value));

        return true;
    }
  

$Id$

Since:
JDK 1.4.2

Method Summary
 boolean execWord()
          Invokes the method to handle the word.
 

Method Detail

execWord

public boolean execWord()
Invokes the method to handle the word.

Returns:
true on success, false on error.