home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / d / djdev108.zip / SAMPLES / HEXCALC / HC.DOC next >
Text File  |  1991-09-11  |  1KB  |  72 lines

  1. valid constants:
  2.  
  3. - decimal ( 45 65 1 )
  4. - real ( 1.0 4.5e-1 0.3 4e3 )
  5. - hex ( 0x45c )
  6. - octal ( 015 )
  7. - binary ( 0b011010010 )
  8. - "rhex" ( 0x1f3.43c ) (Ex: 0xc.8a = 12.5390625)
  9. - constants "pi" and "e"
  10.  
  11. valid identifiers:
  12.  
  13. - up to 200 unique names
  14. - letters, underscores, digits (not first char)
  15.  
  16. history:
  17.  
  18. !! is result of previous expression (same as !1)
  19. !4 is result of fourth previous expression
  20.  
  21. statements:
  22.  
  23. identifier = expression
  24.   assignes value to identifier
  25. expression
  26.   prints value of expression on screen (multi-format)
  27.  
  28. operators: (all except those marked "binary" work with reals)
  29.  
  30. +    addition
  31. -    subtraction
  32. *    multiplication
  33. /    division
  34. %    modulus
  35. <<    left shift (y = x * 2**n)
  36. >>    right shift (y = x / 2**n)
  37. &    binary and
  38. |    binary or
  39. ^    binary xor
  40. **    exponentiation ( 3**2 = 9 )
  41. unary -    negation
  42. unary ~    binary invert
  43. ( )    expression grouping
  44. func()    call built-in function
  45.  
  46. built-in functions:
  47.  
  48. sin
  49. sinh
  50. cos
  51. cosh
  52. tan
  53. tanh
  54. asin
  55. asinh
  56. acos
  57. acosh
  58. atan
  59. atanh
  60. exp
  61. log
  62. pow10
  63. log10
  64. pow2
  65. log2
  66. sqrt
  67.  
  68. exiting:
  69.  
  70. via ^C, ^Z, ^D
  71.  
  72.