How to do $pVar ++

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?

On 7/7/06, ben [email protected] 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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs