1.3.0 permalink Arrow_down_16x16

aset-short

clojure.core

  • (aset-short array idx val)
  • (aset-short array idx idx2 & idxv)
Sets the value at the index/indices. Works on arrays of short. Returns val.

1 Example top

  • ;; create an array of 10 shorts and set one of the values to 31415
    
    user=> (def ss (short-array 10))
    #'user/ss
    user=> (vec ss)
    [0 0 0 0 0 0 0 0 0 0]
    user=> (aset-short ss 3 31415)
    31415
    user=> (vec ss)
    [0 0 0 31415 0 0 0 0 0 0]
    user=>
Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core.clj:3509 top

(def-aset
  ^{:doc "Sets the value at the index/indices. Works on arrays of short. Returns val."
    :added "1.0"}
  aset-short setShort short)
Vars in clojure.core/aset-short:
Used in 0 other vars

Comments top

No comments for aset-short. Log in to add a comment.