Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

RE: do while loops

by Anonymous Monk
on May 24, 2000 at 05:04 UTC ( #14483=note: print w/ replies, xml ) Need Help??

in reply to do while loops

need a semicolon at end of first line "$value=5"

Comment on RE: do while loops
Replies are listed 'Best First'.
Re: RE: do while loops
by snafu (Chaplain) on Jun 15, 2001 at 23:59 UTC
    Couldn't $value = $value - 1; be written like this?:

    $value -= 1; # or $value-- ; # since its just -1

    - Jim

      Yeah, they could.
      I think this example is trying to limit itself to the syntax of the do/while loop, though. So it can be fully understood on its own. Using the 'minimalist' decrement operators might distract someone new to the language.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://14483]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2015-12-02 02:28 GMT
Find Nodes?
    Voting Booth?

    My keyboard shows this many letters:

    Results (31 votes), past polls