home *** CD-ROM | disk | FTP | other *** search
/ PDA Software Library / pdasoftwarelib.iso / PILOT / APPS / CALCONV / CALCONVE.TXT < prev    next >
Encoding:
Text File  |  1996-12-31  |  5.1 KB  |  148 lines

  1. CalConvert for Pilot documentation
  2. Version 1.1 - January 1997 
  3.  
  4. ⌐1996-97 Alessandro Levi Montalcini
  5. C.so Re Umberto 10
  6. 10121 Torino
  7. Italy
  8.  
  9. mailto:alm@torino.alpcom.it
  10. http://persoweb.francenet.fr/~alm
  11. ftp://ftp.alpcom.it/software/mac/LMontalcini
  12. ftp://ftp.alpcom.it/software/mac/LMontalcini/alm.html
  13.  
  14. Shareware: $10 cash
  15.   This program is distributed as shareware: if you use it please
  16. honor the shareware system by sending me US $10 cash or the same
  17. amount in your local currency. You may want to fill out the
  18. provided registration form and print it, or you can simply write
  19. down your name, address and email address, specify the version
  20. and name of this program, and stuff everything in an envelope
  21. along with the money. Any comments, suggestions and bug reports
  22. should be sent via email because I only receive my snail mail
  23. every once in a while.
  24.  
  25. Introduction
  26.   CalConvert for Pilot is a small shareware utility that does
  27. integer arithmetic calculations and converts integer values to
  28. decimal, hexadecimal, octal, binary and to a sequence of four
  29. ASCII characters. The conversion may be signed or unsigned; you
  30. can always enter a signed value, it gets converted to unsigned
  31. if needed. The result can be calculated either as a word (2
  32. bytes) or as a long word (4 bytes). The Return character start
  33. the conversion; tab and the vertical arrow characters move you
  34. from one editing field to another.
  35.  
  36. Notes
  37.   The binary field is too small to show all the binary digits of
  38. large numbers, so the last ones (least significant ones) are not
  39. displayed. Since the binary format is usually pretty useless
  40. when dealing with large numbers, and since adding code to take
  41. care of it would waste more of your Pilot's precious memory, I
  42. chose not to fix this problem.
  43.  
  44. The calculator
  45.   You may enter mathematical or logical expressions in the field
  46. labeled "Math", i.e. things like "(12*(128-$20))<<2+2^8"; the
  47. result is shown in all the other fields of the window when you
  48. draw a Return character or click the "=" button. If the
  49. expression can't be parsed correctly, CalConvert beeps and all
  50. the other fields are set to zero. The next paragraphs explain
  51. the syntax and operators you may use in your mathematical
  52. expressions.
  53.  
  54. Syntax of the math field
  55.   xxx (x=0-9) is a number
  56.   $xxx (x=0-9,A-F) is an hexadecimal number
  57.   -xxx, -$xxx, $-xxx are negative numbers
  58.   '(' and ')' can be used as usual, nesting allowed
  59.   spaces are allowed between numbers and operators
  60.   no spaces are allowed inside numbers or operators
  61.   all numbers are interpreted as 32-bit signed integers
  62.  
  63. Order of the operators
  64. (operators in the upper lines are calculated first,
  65. operators in the same line are calculated sequentially)
  66.     
  67.    ^   **
  68.    *   /   :   %   <<  >>
  69.    &   |   \   AND OR  XOR
  70.    +   -
  71.    =   ==  !=  <>  <   >   <=  >=
  72.  
  73. Arithmetic operators
  74.  
  75.   +     add
  76.   -     subtract
  77.   *     multiply
  78.   /     divide
  79.   :     divide
  80.   %     remainder
  81.   ^     power
  82.   **    power
  83.  
  84. Logical operators
  85. (return 1 if true, 0 if false)
  86.  
  87.   =     equal to
  88.   ==    equal to
  89.   !=    not equal to
  90.   <>    not equal to
  91.   <     less than
  92.   >     greater than
  93.   <=    less or equal
  94.   >=    greater or equal
  95.  
  96. Bitwise operators
  97.  
  98.   <<    bit shift left
  99.   >>    bit shift right
  100.   &     bit and
  101.   AND   bit and
  102.   and   bit and
  103.   |     bit or
  104.   OR    bit or
  105.   or    bit or
  106.   \     exclusive or
  107.   XOR   exclusive or
  108.   xor   exclusive or
  109.  
  110. Version history
  111. 1.1 - Added support for octal conversions.
  112. 1.0 - First public Pilot release.
  113.  
  114. Distribution
  115.   This software is ⌐1996-97 Alessandro Levi Montalcini. It can
  116. be freely distributed as long as it is not modified and there's
  117. no charge for it, but it may not be included in any commercial
  118. package without my consent.
  119.   All online services and bulletin boards may make it available
  120. to their users at no charge other than the normal connection
  121. fees.
  122.   All non-profit user groups may distribute it at no charge.
  123.   All magazines may publish it on floppy disk or CD-ROM without
  124. asking me first, as long as I get a copy of the issue containing
  125. my software.
  126.   All CD-ROM shareware collections and CD-ROM magazines may
  127. include it without my prior consent, as long as I get either a
  128. copy of the CD-ROM or an offer to buy the CD-ROM at a discounted
  129. price.
  130.   All redistribution companies such as Pacific HiTech, AMUG,
  131. Celestin or Educorp may distribute it, as long as I get a copy
  132. of each media containing my software and a catalog of the
  133. company's offerings (where applicable).
  134.   You may find the latest version of all my Macintosh and Pilot
  135. shareware and freeware programs by anonymous ftp to
  136. ftp.alpcom.it, inside the /software/mac/LMontalcini directory.
  137. The ALM Share and ALM Free packages, which contain most of my
  138. Mac stuff and can be registered at a very low price, are also
  139. available there.
  140.  
  141. Disclaimer
  142.   This software should never cause any damage, but you're using
  143. it at your own risk. As an independent software developer, I can
  144. make no warranties whatsoever on it.
  145.  
  146. Have fun! And don't forget to register your shareware, so that
  147. more cool inexpensive utilities can see the light in the future.
  148.