
- Euphoria Tutorial
- Euphoria - Home
- Euphoria - Overview
- Euphoria - Environment
- Euphoria - Basic Syntax
- Euphoria - Variables
- Euphoria - Constants
- Euphoria - Data Types
- Euphoria - Operators
- Euphoria - Branching
- Euphoria - Loop Types
- Euphoria - Flow Control
- Euphoria - Short Circuit
- Euphoria - Sequences
- Euphoria - Date & Time
- Euphoria - Procedures
- Euphoria - Functions
- Euphoria - Files I/O
- Euphoria Useful Resources
- Euphoria - Quick Guide
- Euphoria - Library Routines
- Euphoria - Useful Resources
- Euphoria - Discussion
Euphoria - Assignment Operators
The following simple example program demonstrates the assignment operators. Copy and paste following Euphoria program in test.ex file and run this program −
#!/home/euphoria-4.0b2/bin/eui integer a = 10 integer b = 20 integer c = 0 c = a + b printf(1, "c = a + b = %d\n", c ) c += a printf(1, "c += a = %d\n", c ) c -= a printf(1, "c -= a = %d\n", c ) c *= a printf(1, "c *= a = %d\n", c ) a = 10 c = 30 c /= a printf(1, "c /= a = %d\n", c )
This would produce the following result −
c = a + b = 30 c += a = 40 c -= a = 30 c *= a = 300 c /= a = 3
Euphoria supports all the above operations for other Euphoria data types e.g. sequence, atoms and objects.
euphoria_operators.htm
Advertisements