<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//en">

<!–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&nbsp; - 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&nbsp; instructions can manipulate.

<P>

<DIV class="CENTER"><A ID="fig:objects"></A><A ID="141"></A> <TABLE> <CAPTION class="BOTTOM"><STRONG>Figure:</STRONG> RLaB&nbsp;objects</CAPTION> <TR><TD><IMG STYLE="height: 286.76ex; " SRC="img4.png" ALT="

\begin{figure}\begin{picture}(350,300)(0,25) % (x-size, y-size) (x-shift, y-shif...
.....s
angle=0 hscale=65 vscale=65 voffset=-55 hoffset=40
\end{picture}\end{figure}
"></TD></TR> </TABLE> </DIV>

<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&nbsp; what its class is. For example, RLaB&nbsp; has a built-in command to calculate the sin of an angular quantity - asking RLaB&nbsp; about it gives the following response

<P> <PRE> &gt; 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&nbsp; - 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&nbsp; as a computation tool so now we describe further numeric operations.

<P>

<HR>

</BODY> </HTML>