Zho:替换第 () 项于 () 成 ()（积木）

The Replace Item of  with  积木 is a 清单类积木 and a 条形积木. The block replaces the specified item; in other words, it changes the item's content to the given text.

用法示例
If an item has to change its content, this block will do the job.

Some common uses for the Replace Item of  with  block: 詢問 [What item would you like to change in the grocery list?] 並等待 變數 [item v] 設為 (詢問的答案) 詢問 [What would you like to change it to?] 並等待 變數 [new food v] 設為 (詢問的答案) 替換第 (item) 項於 [Grocery List v] 成 (new food) 說出 [Oops, I got the wrong grocery list! I need to get a new one.] (3) 秒 變數 [item v] 設為 (0) 重複 (清單 [Grocery List v] 的項目數 :: list) 次 變數 [item v] 改變 (1) 替換第 (item) 項於 [Grocery List v] 成 (清單第 (隨機取數 (1) 到 (5)) 項項目\( [Foods v] \) :: list) end 說出 [And Mike crosses the finish line! This is new record for the 100 meter relay!] (4) 秒 替換第 (5 v) 項於 [School Records v] 成 (Relay Time) 替換第 (1 v) 項於 [list v] 成 (字串組合 (清單第 (1 v) 項項目\( [list v] \) :: list) 和 (characters)) // "characters" is the new letters 當分身產生 變數 [id v] 設為 (total clones) 新增項目 [] \( [clonesX v] \) 重複無限次 如果 <[向左 v] 鍵被按下？> 那麼 x 改變 (-2.5) end 如果 <[向右 v] 鍵被按下？> 那麼 x 改變 (2.5) end 替換第 (id) 項於 [clonesX v] 成 (x 座標) end
 * Changing an itemfor example, replacing an object in a list of objects
 * Rewriting a list without deleting all the items and creating new ones
 * Changing a record of certain statistics
 * Adding characters onto an already-existing item
 * Recording positions of individual clones

应用
This block can be replicated with the following code:

刪除第 (value) 項 \( [list v] \) 添加 (item) 為第 (value) 項\( [list v] \)

参见

 * 添加 为第  项
 * 删除第 项