++symbol symbol++ --symbol symbol__
These operators perform auto-increments or decrements on numeric symbols. When the ++ is placed before a symbol, it performs a pre-increment, where the value is incremented and the result is the symbol's value + 1. When ++ is placed after a symbol, it performs a post-increment. Here the result of the operation is the value of the symbol prior to being incremented. The -- operator works in the same way. These operators only take symbols as arguments. It is not possible to auto-increment or decrement an array element, list element, or instance variable.
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.