~ubuntu-branches/ubuntu/precise/zsh/precise

« back to all changes in this revision

Viewing changes to Test/C01arith.ztst

  • Committer: Bazaar Package Importer
  • Author(s): Angel Abad
  • Date: 2011-01-09 23:10:24 UTC
  • mfrom: (2.1.25 sid)
  • Revision ID: james.westby@ubuntu.com-20110109231024-7egfs040r26fq7fa
Tags: 4.3.11-1ubuntu1
* Merge from debian unstable. (LP: #700695) Remaining changes:
  - debian/zshrc: Enable completions by default, unless
    skip_global_compinit is set

Show diffs side-by-side

added added

removed removed

Lines of Context:
188
188
>0xFF
189
189
>FF
190
190
 
 
191
  array=(1)
 
192
  x=0
 
193
  (( array[++x]++ ))
 
194
  print $x
 
195
  print $#array
 
196
  print $array
 
197
0:no double increment for subscript
 
198
>1
 
199
>1
 
200
>2
 
201
 
 
202
  # This is a bit naughty...  the value of array
 
203
  # isn't well defined since there's no sequence point
 
204
  # between the increments of x, however we just want
 
205
  # to be sure that in this case, unlike the above,
 
206
  # x does get incremented twice.
 
207
  x=0
 
208
  array=(1 2)
 
209
  (( array[++x] = array[++x] + 1 ))
 
210
  print $x
 
211
0:double increment for repeated expression
 
212
>2