The Fill( Command

Command Summary

Fills a list or matrix with one number.

Command Syntax


Menu Location


  1. 2nd LIST to access the list menu.
  2. RIGHT to access the OPS submenu.
  3. 4 to select Fill(, or use arrows.

Alternatively, press:

  1. MATRX (83) or 2nd MATRX (83+ or higher) to access the matrix menu.
  2. RIGHT to access the MATH submenu.
  3. 4 to select Fill(, or use arrows.

Calculator Compatibility


Token Size

1 byte

The Fill( command takes an existing list or matrix variable and sets all its elements to a single number. It doesn't return anything and only works on already defined variables.

    {2 2 2 2 2}

    [[1 1 1 1]
     [1 1 1 1]
     [1 1 1 1]]

Fill( is very fast: on a twenty-element real list, it takes only about 3.5 ms, much less than any vectorized list operation.

When Fill( is called on a list, the datatype of the list becomes the datatype of the number. That is, Fill(1,L₁) makes L₁ a real list, and Fill(i,L₁) makes L₁ a complex list.


When creating a new list or matrix you want to fill with zeroes, it's better to delete it then create it with dim(, which will set all entries to 0, than to set its dimensions with dim( (which may not clear what was there before) then use Fill(.


On a TI-84+CSE, using Fill(List,List) will cause a RAM clear. For example: Fill({1,2,3},{1,2,3} will cause a RAM Clear. This does not apply on any other models, as they only give you argument and data type errors.

Related Commands


Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Noncommercial-No Derivative Works 2.5 License.