<HTML> <HEAD> <!-- This HTML file has been created by texi2html 1.51 from ProgrammersManual.texinfo on 4 March 1997 --> <TITLE>LambdaMOO Programmer's Manual - Indexing</TITLE> </HEAD> <BODY> Go to the <A HREF="ProgrammersManual_1.html">first</A>, <A HREF="ProgrammersManual_16.html">previous</A>, <A HREF="ProgrammersManual_18.html">next</A>, <A HREF="ProgrammersManual_77.html">last</A> section, <A HREF="ProgrammersManual_toc.html">table of contents</A>. <P><HR><P> <H3><A NAME="SEC17" HREF="ProgrammersManual_toc.html#TOC17">Indexing into Lists and Strings</A></H3> <P> Both strings and lists can be seen as ordered sequences of MOO values. In the case of strings, each is a sequence of single-character strings; that is, one can view the string <CODE>"bar"</CODE> as a sequence of the strings <CODE>"b"</CODE>, <CODE>"a"</CODE>, and <CODE>"r"</CODE>. MOO allows you to refer to the elements of lists and strings by number, by the <STRONG>index</STRONG> of that element in the list or string. The first element in a list or string has index 1, the second has index 2, and so on. </P> <UL> <LI><A HREF="ProgrammersManual_18.html#SEC18">Extracting</A>: Extracting an Element from a List or String <LI><A HREF="ProgrammersManual_19.html#SEC19">Replacing</A>: Replacing an Element of a List or String <LI><A HREF="ProgrammersManual_20.html#SEC20">Subsequences</A>: Extracting a Subsequence of a List or String <LI><A HREF="ProgrammersManual_21.html#SEC21">Subsequence Replacement</A>: Replacing a Subsequence of a List or String </UL> <P><HR><P> Go to the <A HREF="ProgrammersManual_1.html">first</A>, <A HREF="ProgrammersManual_16.html">previous</A>, <A HREF="ProgrammersManual_18.html">next</A>, <A HREF="ProgrammersManual_77.html">last</A> section, <A HREF="ProgrammersManual_toc.html">table of contents</A>. </BODY> </HTML>