PreviousUpNext

15.3.634  src/lib/x-kit/tut/calculator/accumulator.api

## accumulator.api
#
# The accumulator of the calculator.

# Compiled by:
#     src/lib/x-kit/tut/calculator/calculator-app.lib


# This api is implemented in:
#     src/lib/x-kit/tut/calculator/accumulator.pkg

stipulate
    include package   threadkit;                        # threadkit             is from   src/lib/src/lib/thread-kit/src/core-thread-kit/threadkit.pkg
herein

    api Accumulator {

        Op_T    = PLUS | MINUS | DIVIDE | TIMES;

        Plea_Mail = OP Op_T | CLEAR | EQUAL | DIGIT Int;

        Out_Val = OVAL Int | OINFINITY | OOVERFLOW;

        Accumulator;

        make_accumulator:  Void -> Accumulator;

        send_to_accumulator:          Accumulator -> Plea_Mail -> Void;
        from_accumulator_mailop_of:   Accumulator -> Mailop( Out_Val );

    };

end;

## COPYRIGHT (c) 1991 by AT&T Bell Laboratories.  See SMLNJ-COPYRIGHT file for details.
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext