home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / spread / wnrich.zip / ENRICH.DOC < prev    next >
Text File  |  1993-07-06  |  9KB  |  227 lines

  1. Documentation for ENRICH.DLL
  2. ============================
  3.  
  4. ENRICH.DLL is a set of add-in functions for Quattro Pro for Windows.
  5. These are the same functions that were made available in ENRICH.QLL
  6. for Quattro Pro 4.0 (DOS).  To install, simply copy the file ENRICH.DLL
  7. to your QPW directory.  Once the DLL file is installed, it is available
  8. to Quattro Pro for Windows.
  9.  
  10. To use the functions in this DLL, use the format:
  11.    @ENRICH.FUNC(args)
  12.  
  13. List of Functions In Library:
  14. =============================
  15.  
  16. Metric Functions:
  17.  
  18.    C2F(Value) -- Converts from Celcius to Fahrenheit
  19.    F2C(Value) -- Converts from Fahrenheit to Celcius
  20.    C2I(Value) -- Converts from Centimeters to Inches
  21.    I2C(Value) -- Converts from Inches to Centimeters
  22.    M2K(Value) -- Converts from Miles to Kilometers
  23.    K2M(Value) -- Converts from Kilometers to Miles
  24.    F2M(Value) -- Converts from Feet to Meters
  25.    M2F(Value) -- Converts from Meters to Feet
  26.    K2P(Value) -- Converts from Kilograms to Pounds
  27.    P2K(Value) -- Converts from Pounds to Kilograms
  28.    L2G(Value) -- Converts from Liters to Gallons
  29.    G2L(Value) -- Converts from Gallons to Liters
  30.  
  31. Misc. Functions:
  32.  
  33.    CENTER(String,Block,<Num Char>) -- Centers String over Block.
  34.    TRUNCATE(X,precision)  -- Truncates floating point numbers.
  35.    MEDIAN(Block,direction)  -- Calculates the row or column median.
  36.    RADIX(Value, Radix)  -- Performs a radix conversion.
  37.    AUTHOR  -- Returns the name of the DLL author.
  38.    LIST  -- Returns a list of the function names in the DLL.
  39.  
  40. Metric Functions:
  41. =================
  42. The first group of functions do simple conversions from SAE units to
  43. their metric equivalents.  Each of these functions have the format
  44. @ENRICH.NAME(Value), where Value is the number you wish to convert.
  45. Value can also be a single cell reference.  These functions do not
  46. take block addresses (i.e., A1..B10).
  47.  
  48. Format:  @ENRICH.NNN(X)
  49.  
  50.       NNN    =  The name of the conversion function.
  51.        X     =  The value you want to convert.
  52.  
  53. Example:
  54.    @ENRICH.C2F(100)  =  212
  55.    @ENRICH.F2C(212)  =  100
  56.  
  57. There are limitations to any conversion.  All of these functions are
  58. best used in conjunction with the @ROUND function of Quattro Pro.  This
  59. will eliminate the introduction of rounding errors in your spreadsheet.
  60. The metric functions already limit themselves to 4 decimal places of
  61. precision for their answer.  The answer returned is truncated at 4
  62. decimal places (1/10,000 of a unit) and can be rounded from there.
  63.  
  64.  
  65. Misc. Functions:
  66. ================
  67.  
  68. @ENRICH.CENTER
  69.    Format:  @ENRICH.CENTER(String,Block,<Num Char>)
  70.  
  71.       String   =   The string you wish to center
  72.       Block    =   The block over which you wish to center
  73.       Num Char =   The number of characters in the block (optional).
  74.  
  75. @ENRICH.CENTER will center a string over a block in your spreadsheet.
  76. This function works best with non-proportional fonts.  The function decides
  77. the centering based upon the standard rule used by typists:  go to the
  78. center of the area and backup half the number of characters in what you
  79. want to center.
  80.  
  81. @ENRICH.CENTER requires the first two arguments.  The third argument,
  82. Num Char, is optional.  When this argument is not used, the function
  83. assumes that each of the columns in the block are of the default width
  84. of 14 characters.  If your block has varying column widths, you may
  85. specify the number of characters in the block.
  86.  
  87. If you try to place a string that is larger than the block you are
  88. centering over, @ENRICH.CENTER will simply return your string.
  89. "Hanging Left" centering is not possible with this function.
  90.  
  91. Examples:
  92. =========
  93. In each of the examples, the formula is entered in cell A1.  For best
  94. results, the formula should be entered in a row above the block and in
  95. the column that is the leftmost column in the block.  Example 1 centers a
  96. title over a block with the default column widths, and does not need the
  97. third argument.  Example 2 centers a title over a block with different
  98. sized columns, and shows how to use @CELL to determine the number of
  99. characters in the block.
  100.  
  101. Example 1
  102. ----------
  103.  
  104.   @ENRICH.CENTER("Random Numbers",A2..F2)
  105.  
  106.       A        B        C        D        E        F
  107.   1                     Random Numbers
  108.   2 0.575505 0.078897 0.014898 0.530945 0.633567 0.240323
  109.   3 0.110085 0.825912 0.130397 0.109612 0.619648 0.149765
  110.   4 0.962476 0.829726 0.342533 0.884205 0.823834 0.671436
  111.   5 0.964582 0.223526 0.803665 0.358377 0.239015 0.513799
  112.   6 0.830092 0.254531 0.305531 0.431573 0.871069 0.313581
  113.  
  114. Example 2
  115. ----------
  116.  
  117.   @ENRICH.CENTER("Number Table -- 1992",A2..L2,@CELL("rwidth",A2..L2))   
  118.  
  119.       A    B    C   D    E    F    G    H    I    J    K    L
  120.   1                    Number Table -- 1992                       
  121.   2  Jan  Feb  Mar Apr  May  Jun  Jul  Aug  Sep  Oct  Nov  Dec    
  122.   3    2   14   26  38   50   62   74   86   98  110  122  134    
  123.   4    6   18   30  42   54   66   78   90  102  114  126  138    
  124.   5   10   22   34  46   58   70   82   94  106  118  130  142    
  125.  
  126. Caveats:
  127. ========
  128. Because of the way @ENRICH.CENTER works, it does not lend itself
  129. directly to proportional fonts and graphical modes.  Because each 
  130. font and mixture of characters affects the actual size of the block,
  131. a fudge factor needs to be introduced.  By using the third argument,
  132. you can specify that there is a larger or smaller area over which you
  133. are printing.  By changing this value, you can adjust where the title
  134. appears over the block.
  135.  
  136.  
  137.      =====*****=====
  138.  
  139.  
  140. @ENRICH.TRUNCATE
  141.  
  142.    Format:  @ENRICH.TRUNCATE(X,precision)
  143.       X         =  Value to be truncated.
  144.       precision =  Number of decimal places before truncation
  145.  
  146. @ENRICH.TRUNCATE takes a value and truncates at a the requested number
  147. of decimal places.  This is not the same as rounding.  Rounding would
  148. check the value to the left of the truncation point to decide what the
  149. last number would be.  This function just truncates at the point
  150. requested.
  151.  
  152. Examples:
  153.    @ENRICH.TRUNCATE(1.234892392,0) = 1.000000000
  154.    @ENRICH.TRUNCATE(1.234892392,3) = 1.234000000
  155.    @ENRICH.TRUNCATE(1.234892392,4) = 1.234800000
  156.    @ENRICH.TRUNCATE(1.234892392,7) = 1.234892300
  157.  
  158. This function works best within the first 13 decimal places.  Due to the
  159. vagaries of Binary Rounding, there may be slight deviations in the further
  160. reaches of the decimal values.  There are some combinations of numbers which
  161. will not truncate properly.
  162.  
  163.      =====*****=====
  164.  
  165.  
  166. @ENRICH.MEDIAN
  167.  
  168.    Format:  @ENRICH.MEDIAN(Block,direction)
  169.       Block     =   Block to find the median of
  170.       direction =   Row or Column block
  171.  
  172. @ENRICH.MEDIAN finds the median (middle) value in the list.  For best
  173. results, the list should be sorted.  By changing the second argument
  174. (direction), you tell the function that you are taking the median of a
  175. column of data (0), or of a row of data (1).  Any value besides 1 or 0
  176. will result in ERR.  This function only calculates the median value of
  177. a single row or column.  If you use a block that is multi columnar
  178. (i.e, A1..C10), @ENRICH.MEDIAN will caluclate the median of the first
  179. column or block in the row depending on the value of direction.
  180.  
  181. Examples:
  182.  
  183.       A       B      C      D      E      F       G
  184.  1             1.00
  185.  2             1.34
  186.  3             1.68         Example 1 -- Columnar Median
  187.  4             2.02
  188.  5             2.36
  189.  6
  190.  7    Median   1.68
  191.  8
  192.  9
  193. 10             1.00   1.34   1.68   2.02   2.36    2.70
  194. 11
  195. 12    Median   1.85         Example 2 -- Row Median
  196. 13
  197.  
  198. Formula for Example 1:  @ENRICH.MEDIAN(B1..B5,0)
  199. Formula for Example 2:  @ENRICH.MEDIAN(B10..G10,1)
  200.  
  201.  
  202.      =====*****=====
  203.  
  204.  
  205. @ENRICH.RADIX
  206.  
  207.    Format:  @ENRICH.RADIX(Value,Radix)
  208.       Value   =  The value to perform the radix operation on.
  209.       Radix   =  The base (or radix) used against the Value.
  210.  
  211. @ENRICH.RADIX performs a basic radix conversion on a value.  A radix
  212. conversion changes the value to a different base.  Normal, everyday
  213. numbers are base 10 values.  Binary numbers are base 2, etc.  This
  214. function is useful for answering such life-threatening questions as
  215. "What is 1546 in binary?".  @ENRICH.RADIX returns the answers as
  216. labels only.
  217.  
  218. Examples:
  219.    @ENRICH.RADIX(1546,2)   =  11000001010
  220.    @ENRICH.RADIX(1546,16)  =  60a
  221.  
  222. Caveats:
  223. ========
  224. Value must be a positive integer <= 32,767 and Radix must be >= 2 and
  225. <= 36.  The function will return ERR if these requirements are not
  226. met.
  227.