<!–Converted with LaTeX2HTML 2022 (Released January 1, 2022) –> <HTML lang="en"> <HEAD> <TITLE>Contents of Object Hierarchy</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"> <META NAME="viewport" CONTENT="width=device-width, initial-scale=1.0"> <META NAME="Generator" CONTENT="LaTeX2HTML v2022">
<LINK REL="STYLESHEET" HREF="rlabp_tex.css">
<LINK REL="next" HREF="node19_mn.html"> <LINK REL="previous" HREF="node17_mn.html"> <LINK REL="up" HREF="node16_mn.html"> <LINK REL="next" HREF="node19_mn.html"> </HEAD>
<BODY bgcolor="#ffffff" text="#000000" link="#9944EE" vlink="#0000ff" alink="#00ff00">
<H2><A ID="SECTION00062000000000000000"> Object Hierarchy</A> </H2>
<P> Scan your eyes down over Figure <A HREF="node18_ct.html#fig:objects"><IMG ALT="[*]" SRC="crossref.png"></A> which shows the hierarchical structure of objects in RLaB - we shall now describe this figure from the bottom up (ignoring lists until a little later). Not all objects are created in the same way and what you can do with or to them depends on their <EM>class</EM>. Items of class <EM>function</EM> contain program instructions which is one form of data or information. Items of class <EM>numeric</EM>, and <EM>string</EM> contain data that RLaB instructions can manipulate.
<P>
<DIV class="CENTER"><A ID="fig:objects"></A><A ID="141"></A> <TABLE> <CAPTION class="BOTTOM"><STRONG>Figure:</STRONG> RLaB objects</CAPTION> <TR><TD><IMG STYLE="height: 286.76ex; " SRC="img4.png" ALT="
<P> A numeric class item can store a real or complex number. An item of class string contains a null-terminated string of character(s). When we want to access or create an array of items, we use an array syntax that is the same for both string and numeric classes.
<P> It is often helpful to a programmer to group together unlike data into a single object - this is the purpose of the class list. We are not going to describe it in great detail here except to point out that it serves a similar role to a record in Pascal or a structure in C, but with a somewhat more flexible access mechanism. Note that lists can contain any of the aforementioned objects, even another list.
<P> One thing that you can always do with any item is ask RLaB what its class is. For example, RLaB has a built-in command to calculate the sin of an angular quantity - asking RLaB about it gives the following response
<P> <PRE> > class( sin ) function </PRE>
<P> From the size of the list of topics that help is available on, you probably realise that there are many built-in functions in RLaB - expect gratuitous use of these functions as further examples are given. Remember that you can find out about any function by typing <TT>help</TT> <EM>function-name</EM>. We are particularly interested in exploring the use of RLaB as a computation tool so now we describe further numeric operations.
<P>
<HR>
</BODY> </HTML>