This is Calculator.h in view mode; [Download] [Up]
/*
** Interface file for calculator exercise, lab #1
** NeXT Technical Support
*/
#import <objc/Object.h>
#define STACKSIZE 20
@interface Calculator:Object
{
id aWindow; /* main window in which calculator is drawn */
id viewer; /* calculator's simulated LCD display */
char viewerStr[24]; /* string of digits to put in viewer */
double stack[STACKSIZE];
int topOfStack;
BOOL frozen; /* flag to freeze calculator's functioning
upon encountering an error, until
"clear" button is clicked */
}
+new;
-(double)pop;
-push:(double)aNum;
-(double)getOperand;
-displayValue:(double)aNum;
-pushAndDisplay:(double)aNum;
-enter:sender;
-clearDisplay:sender;
-digit:sender;
-period:sender;
-add:sender;
-subtract:sender;
-multiply:sender;
-divide:sender;
-changeSign:sender;
-stackError:(STR)errorMsg;
- setAWindow:anObject;
- setViewer:anObject;
- windowWillClose:sender;
@end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.