home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1994 November / macformat-018.iso / Utility Spectacular / Developer / FMAT Editor 1.0.1 folder / FormatVal.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-08-18  |  1.2 KB  |  42 lines  |  [TEXT/KAHL]

  1.  
  2. #if __option(double_8) || !__option(native_fp)
  3.     #error
  4. /*
  5.     FormatVal assumes "double" is a SANE 80-bit extended value. You need to
  6.     turn off "8-byte doubles" and turn on "Native floating-point format" on
  7.     the Options dialog under "Compiler Settings."
  8.  
  9.     If you want "double" to be something else, you'll need to modify FormatVal
  10.     to convert its "x" argument to an extended80.
  11. */
  12. #endif
  13.  
  14.  
  15. /* New names for Script Manager routines not yet in Apple's H files */
  16. #define FormatRecToString        Format2Str
  17. #define StringToExtended        FormatStr2X
  18. #define ExtendedToString        FormatX2Str
  19. #define StringToFormatRec        Str2Format
  20. #define GetIntlResourceTable    IUGetItlTable
  21.  
  22.  
  23. OSErr FormatVal( double x, short formatID, StringPtr formattedX );
  24.  
  25. /*
  26.     Parameters
  27.     ==========
  28.     double x                -- the value to be formatted
  29.     short formatID            -- ID of 'FMAT' resource to be used for formatting
  30.     StringPtr formattedX    -- the result; empty string if return value != noErr
  31.  
  32.     Returns
  33.     =======
  34.     noErr                    -- all is ok
  35.     paramErr                -- default number parts table not found
  36.     resNotFound                -- 'FMAT' resource not found
  37.     positive                -- a FormatStatus code
  38.  
  39.  
  40.     -- Michael Hecht (Michael_Hecht@mac.sas.com)
  41.        August 18, 1993
  42. */