- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

# C:/Musimathics_local/Musimat/include/Aliases.h File Reference

Declarations of Musimat typedefs and aliases. More...

Go to the source code of this file.

## Defines
#define | Repeat while (true)
| Repeat execution of a compound statement continuously.
#define | Halt exit
| Terminate execution at program location where Halt appears.
#define | Return return
| Terminate execution of function and return a value (if given).
#define | Break break
| Terminate the smallest enclosing repeating statement.
#define | Continue continue
| Pass control to the next iteration of the smallest enclosing repeating statement.
#define | If if
| Conditionally execute simple or compound statement.
#define | Else else
| Terminate execution of function and return a value (if given).
#define | Do do
| Execute statement repeatedly until expression becomes False.
#define | While while
| Execute statement repeatedly until expression becomes False.
#define | Goto goto
| Transfer control directly.
#define | For for
| Transfer control directly.
#define | Void void
| Void declarator.
#define | Const const
| Const declarator.
#define | Volatile volatile
| Volatile declarator.
#define | True true
| Positive boolean value.
#define | False false
| Negative boolean value.
#define | Character char
| Datatype of a single character.
#define | Static static
| Static declarator.
#define | Reference &
| Static declarator.
#define | And &&
| And operator.
#define | Or ||
| Or operator.
## Typedefs
typedef int | Integer
| Type of an integer variable.
typedef double | Real
| Type of a real variable.
typedef bool | Bool
| Type of a boolean variable.
typedef char * | String
| String data type.

## Detailed Description

Declarations of Musimat typedefs and aliases.

Definition in file Aliases.h.

## Define Documentation

#define And &&

And operator.

The logical operators, And and Or, are used to combine multiple conditions formed using relational or equality expressions. The And operator returns the integral value 1 if both operands are nonzero; otherwise, it returns 0. And has left-to-right associativity.

In C++, And is implemented as &&.

Definition at line 297 of file Aliases.h.

Referenced by Matrix< Type >::operator+(), Matrix< Type >::operator-(), Rhythm::operator==(), Rational::operator==(), and Matrix< Type >::SetSize().

#define Break break

Terminate the smallest enclosing repeating statement.

Terminate the smallest enclosing Do, For, Switch, While or Repeat statement in which it appears. In C++, Break is implemented as break.

Definition at line 78 of file Aliases.h.

Referenced by Pitch::isAccidental(), Pitch::isPitchClass(), Pitch::print(), and Pitch::transpose().

#define Character char

Datatype of a single character.

In C++, Character is implemented as char.

Definition at line 251 of file Aliases.h.

Referenced by Pitch::print().

#define Const const

Const declarator.

When modifying a data declaration, the Const keyword specifies that the object or variable is not modifiable. When following a member function's parameter list, the const keyword specifies that the function doesn't modify the object for which it is invoked.

In C++, Const is implemented as const.

Definition at line 210 of file Aliases.h.

Referenced by RealToRational().

#define Continue continue

Pass control to the next iteration of the smallest enclosing repeating statement.

Pass control to the next iteration of the smallest enclosing Do, For, Repeat or While statement in which it appears. In C++, Continue is implemented as continue.

Definition at line 85 of file Aliases.h.

#define Do do

Execute statement repeatedly until expression becomes False.

Do statement While( expression );

Execute statement repeatedly until controlling expression becomes False (0).

In C++, Do is implemented as do.

Definition at line 126 of file Aliases.h.

#define Else else

Terminate execution of function and return a value (if given).

If( expression ) statement1 [Else statement2]

See If.

In C++, Else is implemented as else.

Definition at line 114 of file Aliases.h.

Referenced by List< Type >::checkSize(), operator>>(), Pitch::Pitch(), Pitch::print(), randTendency(), RealToRational(), List< Type >::SetListSize(), Matrix< Type >::SetSize(), and Pitch::transpose().

#define False false

Negative boolean value.

False is the other of the two values that a variable of type Bool can have. In C++, False is implemented as false.

Definition at line 245 of file Aliases.h.

Referenced by Matrix< Type >::operator==(), and List< Type >::operator==().

#define For for

Transfer control directly.

For( [init-expr]; [cond-expr]; [loop-expr] ) statement

The For keyword executes statement repeatedly.

First, the initialization (init-expr) is evaluated. Then, while the conditional expression (cond-expr) evaluates to a nonzero value, statement is executed and the loop expression (loop-expr) is evaluated. When cond-expr becomes 0, control passes to the statement following the For loop.

In C++, For is implemented as for.

Definition at line 177 of file Aliases.h.

Referenced by IntegerListToPitchList(), Invert(), List< Type >::invert(), Map(), List< Type >::max(), List< Type >::maxPos(), List< Type >::min(), List< Type >::minPos(), Matrix< Type >::operator *(), List< Type >::operator *(), List< Type >::operator!=(), Matrix< Type >::operator+(), List< Type >::operator+(), List< Type >::operator+=(), Matrix< Type >::operator-(), List< Type >::operator-(), List< Type >::operator-=(), List< Type >::operator/(), Matrix< Type >::operator==(), List< Type >::operator==(), Pitch::Pitch(), PitchListToIntegerList(), Matrix< Type >::print(), List< Type >::print(), RandomRow(), RealListToRationalList(), RealToRational(), List< Type >::retrograde(), SetComplex(), shuffle(), stretch(), Transpose(), and List< Type >::transpose().

#define Goto goto

Transfer control directly.

Goto name; . . . name: statement

Transfer control directly to the statement specified by the label name.

In C++, Goto is implemented as goto.

Definition at line 160 of file Aliases.h.

#define Halt exit

Terminate execution at program location where Halt appears.

Terminate the current program at the program location where Halt appears. Halt() takes an Integer argument, conventionally containing an error code to pass back to the calling context. In C++, Halt() is implemented as exit().

Definition at line 64 of file Aliases.h.

#define If if

Conditionally execute simple or compound statement.

If( expression ) statement1 [Else statement2]

The If keyword executes statement1 if expression is true (nonzero); If else is present and expression is false (zero), it executes statement2. After executing statement1 or statement2, control passes to the next statement.

In C++, If is implemented as if.

Definition at line 101 of file Aliases.h.

Referenced by List< Type >::checkSize(), Random::lCRandom(), List< Type >::maxPos(), List< Type >::minPos(), List< Type >::operator!=(), Matrix< Type >::operator=(), List< Type >::operator=(), Matrix< Type >::operator==(), List< Type >::operator==(), operator>>(), palindrome(), permute(), Pitch::Pitch(), Rhythm::print(), Rational::print(), Pitch::print(), Matrix< Type >::print(), List< Type >::print(), Complex::print(), RandomRow(), randTendency(), Rational::Rational(), RealToRational(), Rhythm::Rhythm(), List< Type >::rotate(), List< Type >::SetListSize(), Matrix< Type >::SetSize(), Pitch::transpose(), and List< Type >::~List().

#define Or ||

Or operator.

The logical operators, And and Or, are used to combine multiple conditions formed using relational or equality expressions. The Or operator returns the integral value 1 if either operand is nonzero; otherwise, it returns 0. Or has left-to-right associativity.

In C++, Or is implemented as ||.

Definition at line 309 of file Aliases.h.

#define Reference &

Static declarator.

A Reference is a 16-bit or 32-bit quantity that holds the address of an object but behaves syntactically like that object. A Reference declaration consists of an (optional) list of specifiers followed by a Reference declarator.

Any object whose address can be converted to a given pointer type can also be converted to the analogous Reference type.

In C++, Reference is implemented as &.

Definition at line 285 of file Aliases.h.

#define Repeat while (true)

Repeat execution of a compound statement continuously.

Put Repeat at the head of a compound list to cause the enclosed statements to repeat indefinitely. NOTE: the compound list must contain a Halt, Return, Break or Continue statement, otherwise the program will enter an infinite loop.

Definition at line 56 of file Aliases.h.

#define Return return

Terminate execution of function and return a value (if given).

Terminate execution of the function in which it appears and returns control (and the value of expression if given) to the calling function. In C++, Return is implemented as return.

Definition at line 71 of file Aliases.h.

Referenced by Abs(), Complex::Abs(), AbsDuration(), Rhythm::absDuration(), Accidental(), Pitch::accidental(), Atan(), Atan2(), Ceiling(), Matrix< Type >::cols(), Conjugate(), Complex::Conjugate(), Cos(), cycle(), dBCoefficient(), dBSIL(), dBSPL(), Pitch::degree(), Divide(), Duration(), Rhythm::duration(), Exp(), Complex::Exp(), Floor(), Random::getTime(), Pitch::hertz(), Pitch::HzReference(), Complex::i(), ImagPart(), inRange(), IntegerListToPitchList(), InterpTendency(), Invert(), IRandom(), Pitch::isAccidental(), isnumeric(), Pitch::isPitchClass(), Join(), KeyToHertz(), LCRandom(), Random::lCRandom(), Length(), List< Type >::length(), LinearInterpolate(), linearInterpolate(), Log(), Log10(), Map(), Max(), List< Type >::max(), MaxPos(), List< Type >::maxPos(), metronome(), Min(), List< Type >::min(), MinPos(), List< Type >::minPos(), Minus(), Rhythm::mm(), Mod(), Multiply(), Octave(), Pitch::octave(), Rhythm::operator *(), Rational::operator *(), Pitch::operator *(), Matrix< Type >::operator *(), List< Type >::operator *(), Complex::operator *(), Rhythm::operator *=(), Rational::operator *=(), Pitch::operator *=(), Complex::operator *=(), Pitch::operator Integer(), Pitch::operator Real(), Rhythm::operator!=(), Rational::operator!=(), Pitch::operator!=(), Matrix< Type >::operator!=(), List< Type >::operator!=(), Complex::operator!=(), Pitch::operator%(), Rhythm::operator+(), Rational::operator+(), Pitch::operator+(), Matrix< Type >::operator+(), List< Type >::operator+(), Complex::operator+(), Rhythm::operator+=(), Rational::operator+=(), Pitch::operator+=(), List< Type >::operator+=(), Complex::operator+=(), Rhythm::operator-(), Rational::operator-(), Pitch::operator-(), Matrix< Type >::operator-(), List< Type >::operator-(), Complex::operator-(), Rhythm::operator-=(), Rational::operator-=(), Pitch::operator-=(), List< Type >::operator-=(), Complex::operator-=(), Rhythm::operator/(), Rational::operator/(), Pitch::operator/(), List< Type >::operator/(), Complex::operator/(), Rhythm::operator/=(), Rational::operator/=(), Pitch::operator/=(), Complex::operator/=(), Rhythm::operator<(), Rational::operator<(), Pitch::operator<(), Complex::operator<(), operator<<(), Rhythm::operator<=(), Rational::operator<=(), Pitch::operator<=(), Complex::operator<=(), Rational::operator=(), Matrix< Type >::operator=(), List< Type >::operator=(), Complex::operator=(), Rhythm::operator==(), Rational::operator==(), Pitch::operator==(), Matrix< Type >::operator==(), List< Type >::operator==(), Complex::operator==(), Rhythm::operator>(), Rational::operator>(), Pitch::operator>(), Complex::operator>(), Rhythm::operator>=(), Rational::operator>=(), Pitch::operator>=(), Complex::operator>=(), operator>>(), Matrix< Type >::operator[](), List< Type >::operator[](), Complex::operator~(), palindrome(), permute(), Pitch::pianoKey(), Pitch::Pitch(), PitchClass(), Pitch::pitchClass(), PitchListToIntegerList(), PitchToHertz(), Plus(), PosMod(), Pow(), Rhythm::print(), Rational::print(), Pitch::print(), Complex::r(), Random(), Random::random(), RandomRow(), randTendency(), RealListToRationalList(), RealPart(), RealToRational(), Retrograde(), Rotate(), Round(), Matrix< Type >::rows(), Random::seed(), SeedRandom(), SetComplex(), shuffle(), Sin(), Sqrt(), stretch(), Rhythm::tempo(), Time(), Transpose(), and unitInterp().

#define Static static

Static declarator.

When modifying a variable, the static keyword specifies that the variable has static duration (it is allocated when the program begins and deallocated when the program ends) and initializes it to 0 unless another value is specified. When modifying a variable or function at file scope, the static keyword specifies that the variable or function has internal linkage (its name is not visible from outside the file in which it is declared).

In C++, when modifying a data member in a class declaration, the static keyword specifies that one copy of the member is shared by all the instances of the class. When modifying a member function in a class declaration, the static keyword specifies that the function accesses only static members.

In C++, Static is implemented as static.

Definition at line 271 of file Aliases.h.

#define True true

Positive boolean value.

True is one of the two values that a variable of type Bool can have. In C++, True is implemented as true.

Definition at line 238 of file Aliases.h.

Referenced by List< Type >::operator!=(), Matrix< Type >::operator==(), and List< Type >::operator==().

#define Void void

Void declarator.

When used as a function return type, the Void keyword specifies that the function does not return a value. When used for a function's parameter list, Void specifies that the function takes no parameters. When used in the declaration of a pointer, Void specifies that the pointer is "universal."

If a pointer's type is Void *, the pointer can point to any variable that is not declared with the Const or Volatile keyword. A Void pointer cannot be dereferenced unless it is cast to another type. A Void pointer can be converted into any other type of data pointer.

A Void pointer can point to a function, but not to a class member.

Variables may not be declared to be of type void.

In C++, Void is implemented as void.

Definition at line 198 of file Aliases.h.

#define Volatile volatile

Volatile declarator.

The volatile keyword is a type qualifier used to declare that an object can be modified in the program by something other than statements, such as the operating system, the hardware, or a concurrently executing thread.

Objects declared as volatile are not used in optimizations because their value can change at any time. The system always reads the current value of a volatile object at the point it is requested, even if the previous instruction asked for a value from the same object. Also, the value of the object is written immediately on assignment.

One use of the volatile qualifier is to provide access to memory locations used by asynchronous processes such as interrupt handlers.

In C++, Volatile is implemented as volatile.

Definition at line 230 of file Aliases.h.

#define While while

Execute statement repeatedly until expression becomes False.

while ( expression ) statement

The expression is evaluated.

If expression is initially false, the body of the While statement is never executed, and control passes from the While statement to the next statement in the program. If expression is True (nonzero), the body of the statement is executed and the process is repeated beginning at step 1.

The While statement can also terminate when a Break, Goto, or Return within the statement body is executed. Use the Continue statement to terminate an iteration without exiting the While loop. The Continue statement passes control to the next iteration of the While statement.

In C++, While is implemented as while.

Definition at line 147 of file Aliases.h.

Referenced by Mod(), operator>>(), Pitch::Pitch(), PosMod(), and Pitch::transpose().

## Typedef Documentation

typedef bool Bool

Type of a boolean variable.

In C++, Bool is declared as type bool. The underlying type this translates to is compiler dependent, but is generally a 32-bit integer value of which 1 bit (the LSB) is used.

Definition at line 43 of file Aliases.h.

typedef int Integer

Type of an integer variable.

In C++, Integer is declared as type long int. The underlying type this translates to is compiler dependent, but is generally a 32-bit integer value.

Definition at line 28 of file Aliases.h.

typedef double Real

Type of a real variable.

In C++, Real is declared as type long double. The underlying type this translates to is compiler dependent, but is generally a 64-bit IEEE floating point value.

Definition at line 35 of file Aliases.h.

typedef char* String

String data type.

In C++, String is implemented as char*.

Definition at line 48 of file Aliases.h.