#include "MusimatTutorial.h"Go to the source code of this file.
Functions | |
| MusimatTutorialSection (B0107) | |
| MusimatTutorialSection | ( | B0107 | ) |
Definition at line 2 of file B0107.cpp.
00002 { 00003 Print("*** B.1.7 Lists ***"); 00004 /***************************************************************************** 00005 00006 B.1.7 Lists 00007 00008 We can group sets of variables to keep track of their relations. 00009 An IntegerList represents a collection of Integer expressions, for example, 00010 *****************************************************************************/ 00011 00012 IntegerList iL(1, 1+1, 3, 5-1); 00013 00014 /***************************************************************************** 00015 defines a list iL containing the integers 1 through 4. 00016 A RealList represents a collection of Real expressions: 00017 *****************************************************************************/ 00018 00019 RealList rL(1.1, 2.2, 3.3, 4.4); 00020 00021 /***************************************************************************** 00022 We can obtain the length of a list of any type. For example, 00023 *****************************************************************************/ 00024 00025 Integer n = Length(rL); 00026 Print(n); 00027 00028 /***************************************************************************** 00029 prints 4. 00030 00031 The value can be seen when running this application in the console window 00032 if the output of this application has not been redirected. 00033 00034 *****************************************************************************/ 00035 }}
1.4.7