ftp.nice.ch/pub/next/unix/developer/ObjcGrammarTest.s.tar.gz#/ObjcGrammarTest/main.m

This is main.m in view mode; [Download] [Up]

//
// main.m
//
// Test program for ObjcGrammarTest
//
// By Gregor N. Purdy
// 
// See the README file.
//


#import <stdio.h>
#import "TestClass.h"


int main(int argc, char *argv[])
{
    id	myObj;
    
    myObj = [[TestClass alloc] init];
    
    printf("\nInstance %p returns %d.\n\n", (char *)[myObj :myObj :myObj :myObj :myObj],
    	[TestClass :myObj]);

    printf("Testing...\n");
    
    if([TestClass :5 isLessThan:10])
    	printf("Yep! 5 < 10, according to TestClass!\n");
    else
    	printf("Woah! TestClass doesn't think 5 < 10!\n");

    return 0;
}


//
// End of file.
//

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.