http://www.aros.orgAROS-ExecTeam AROSAROS-Exec Archives

Home

English

Deutsch

Ελληυικά

Français

Italiano

Nederlands

Polski

Português

Русский

Español

Suomi

Svenska

Česky


News

Archive

Introduction

Status
Screenshots
Ports
License

Download


Documentation

Users
Installation
Using
Shell commands
Applications
FAQ
Developers
Contribute
Roadmap
Bug Tracker
Working with Subversion
Compiling
Application Development Manual
Zune Application Development Manual
System Development Manual
Debugging Manual
Reference
Specifications
UI Style Guide
Documenting
Porting
Translating
Summaries
Links

Contact

Mailing lists
IRC channels

Credits

Acknowledgements


Pictures

Developers
Developers en Masse

Sponsors

Linking

Links

SourceForge Logo

Eval

Index Prev Next


Eval

Synopsis

VALUE1/A,OP,VALUE2/M,TO/K,LFORMAT/K

Location

Workbench:C

Function

Evaluate an integer expression and print the result. The result is
written to standard output if not the TO switch are used which instead
prints the result to a file. Using the switch LFORMAT, it is
possible to direct how to write the result. Numbers prefixed by
0x or #x are interpreted as hexadecimal and those prefixed by # or 0
are interpreted as octals. Alphabetical characters are indicated
by a leading single quotation mark ('), and are evaluated as their
ASCII equivalent.

Inputs

VALUE1,
OP,
VALUE2      --  The expression to evaluate. The following operators
                are supported

                Operator              Symbols
                ----------------------------------
                addition              +
                subtraction           -
                multiplication        *
                division              /
                modulo                mod, M, m, %
                bitwise and           &
                bitwise or            |
                bitwise not           ~
                left shift            lsh, L, l
                right shift           rsh, R, r
                negation               -
                exclusive or          xor, X, x
                bitwise equivalence   eqv, E, e

TO          --  File to write the result to
LFORMAT     --  printf-like specification of what to write.
                The possible swiches are:

                %x  --  hexadecimal output
                %o  --  octal output
                %n  --  decimal output
                %c  --  character output (the ANSI-character
                        corresponding to the result value)

                By specifying *n in the LFORMAT string, a newline
                is output.

Copyright © 1995-2008, The AROS Development Team. All rights reserved.
Amiga® is a trademark of Amiga Inc. All other trademarks belong to their respective owners.