File: myc.doc

package info (click to toggle)
hexer 0.1.5-3
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 724 kB
  • ctags: 967
  • sloc: ansic: 12,189; makefile: 99
file content (46 lines) | stat: -rw-r--r-- 2,127 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
NAME
       myc - a simple calculator

SYNOPSIS
       myc [command]

DESCRIPTION
       Myc  is  a  simple  calculator  capable  of all operations
       available in C.  Commands are entered in  infix  notation.
       It  is  possible  to use parentheses.  If a myc-command is
       specified on the command-line, the result  is  echoed  and
       myc  exits immediately.  If invoked with no arguments, myc
       starts reading commands from standard-in.  myc understands
       the  following binary infix operators (from highest prior-
       ity to lowest): ** (power), * (multiply),  /  (divide),  %
       (modulo),  +  (add),  -  (subtract),  <<  (shift left), >>
       (shift right), < (less), <= (less or equal), >  (greater),
       >=  (greater  or  equal),  ==  (equal),  != (not equal), &
       (arithmetical and), | (arithmetical or),  ^  (arithmetical
       exclusive  or),  &&  (logical  and),  ||  (logical  or), =
       (assign);  and the following  unary  prefix  operators:  -
       (negate,  unary  minus), !  (logical not), ~ (bitwise com-
       plement).  myc knows three data  types:  boolean,  integer
       (32 bit), float (64 bit, equivalent to C double).  On some
       esoteric platforms the precision of integer and float  may
       be different.  As in C the result of a division depends on
       the data types of the operands.  An integer divided by  an
       integer yields an integer.  If you want the result to be a
       float, make sure one of the operands is a float, e.g. type
       4/7.   instead  of  4/7  or a/(b+0.)  instead of a/b.  The
       power operation returns a float if the result is too large
       to  fit  in  an  integer.   The result of a calculation is
       stored in the special variables $$ and $n where n  is  the
       number of the command.

BUGS
       Maybe.  Please report bugs to demetrio@cs.uni-sb.de.

COPYRIGHT
       myc is not in the public domain, but freely distributable.
       It may be used for any non-commercial purpose.   See  file
       COPYRIGHT for details.

AUTHOR
       Sascha Demetrio
       demetrio@cs.uni-sb.de