home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / sampl254.zip / gcc2 / samples / sample5 / Float.m < prev    next >
Text File  |  1993-11-07  |  285b  |  24 lines

  1. #import <stdio.h>
  2. #import "Float.h"
  3.  
  4. @implementation Float
  5. {
  6.   float value;
  7. }
  8.  
  9. - init: (float) x
  10. {
  11.   [super init];        // In case the parent class is doing
  12.               // something special in its init...
  13.   value = x;
  14.   return self;
  15. }
  16.  
  17. - report
  18. {
  19.   printf("%4.1f", value);
  20.   return self;
  21. }
  22.  
  23. @end
  24.