This has been bugging me for a while In php you can do $pVar++ to add 1 or $pVar-- to subtract, how can this be done in ruby? -- Posted via http://www.ruby-forum.com/.
On 7/7/06, ben <ben@streamd.com> wrote:> This has been bugging me for a while > > In php you can do $pVar++ to add 1 or $pVar-- to subtract, how can this > be done in ruby?var += 1 and var -= 1. martin
ben wrote on 07.07.2006 14:43:> This has been bugging me for a while > > In php you can do $pVar++ to add 1 or $pVar-- to subtract, how can this > be done in ruby? >$pVar += 1 $pVar -= 1 http://wiki.rubygarden.org/Ruby/page/show/IncrementOperator