- Lab 3:
- This lab will ask you to do some things with tables. You may need to look at some
of the explain files in order to find out how to use some of the commands.
- What you need to do:
- The NeXtMidas shell comes with a few tables pre-defined (
AUX
,
OPT
, REG
, RAM
, and ENV
).
What is the value of USER
in the ENV
table?
- The registry table (
REG
) has a table of handlers. The table of
handlers has multiple tables in it, one of which is called FILE
.
In that FILE
table, what is the value of JPEG
?
- Set a result named
FILE_TYPE
to PRM
.
- Use
SAY
to print out the value in the FILE
table
that corresponds with FILE_TYPE
.
- Create an empty table called
PEOPLE
. Add two sub tables to it,
the first named JOHN
set to {AGE=32,HEIGHT={FEET=5,INCHES=9}}
and the second named LINDA
set to
{AGE=30,HEIGHT={FEET=5,INCHES=2}}
.
- Use
CALCULATOR
to compute John's total height in inches. Store that
value in a result named HEIGHT
.
- Compute John's total height again in inches, but this time store it back into the
people table under John's entry. Call it
HEIGHT
, replacing the
previous height in a table with a total height in inches. Then do the same for
Linda.
- Use
INFO
to print out John's and Linda's heights in inches. When it
prints it should look like "John is 69.0in tall
".