Euphoria 賦值運算符

下面的簡單示例程序演示了賦值運算符。複製並粘貼以下Euphoria 程序在test.ex文件並運行這個程序:

#!/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 )

這將產生以下結果:

c = a + b = 30
c += a = 40
c -= a = 30
c *= a = 300
c /= a = 3

注: 其他的Euphoria 數據類型例如Euphoria 支持所有上述操作序列,原子和對象。