You're viewing version 1.2.0 of aset-int. The latest stable version of Clojure Core is 1.3.0.
1.2.0 Arrow_down_16x16

aset-int

clojure.core

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

1 Example top

  • ;; create an array of 10 ints and set one of the values to 31415
    
    user=> (def is (int-array 10))
    #'user/is
    user=> (vec is)
    [0 0 0 0 0 0 0 0 0 0]
    user=> (aset-int is 3 31415)
    31415
    user=> (vec is)
    [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:3021 top

(def-aset
  ^{:doc "Sets the value at the index/indices. Works on arrays of int. Returns val."
    :added "1.0"}
  aset-int setInt int)
Vars in clojure.core/aset-int: int
Used in 3 other vars make-array swap-case swap-case

Comments top

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