The right() Command

right.png

Command Summary

Returns a subsection from the right of a list or string, or the right hand side of an equation.

Command Syntax

right(equation)
right(list-or-string,length)

Menu Location

  • Press 2nd MATH to enter the MATH popup menu.
  • Press 3 to enter the List submenu.
  • Press B to select right(.

Calculator Compatibility

This command works on all calculators.

Token Size

2 bytes

When applied to a list or a string, right(x,length) gets the last (right-most) length elements/characters of x.

When applied to an equation (such as x=5) or an inequality (such as x<3), right() returns the right-hand side of the equation. This only works for equations that don't get simplified: right(2+2=4) will not work, because 2+2=4 will return 'true' first.

:right({1,2,3,4,5},3)
           {3  4  5}
:right("TI-Basic Developer",9)
           "Developer"
:right(x^2+2x+1>0)
           0
:right({1,2,3,4,5},0)
           {}

Error Conditions

260 - Domain error happens when the argument is not a list, string, or equation, or is an equation that has simplified.

Related Commands

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License