## `prog::init` -- loading objects

#### Introduction

`prog::init(`object`)` initializes the MuPAD object `object`.

#### Call(s)

`prog::init(object)`

#### Parameters

`object` | - | MuPAD object to initialize or option All

#### Options

`All` | - | initialising all MuPAD objects

#### Returns

`prog::init` returns the void object `null()`.

#### Related Functions

`loadproc`, `Pref::verboseRead`, `prog::check`

#### Details

- `prog::init` can be used to initialize MuPAD objects.
- Almost all MuPAD objects (domains, procedures etc.) are loaded into memory at their first use. This mechanism saves a lot of memory and time while starting MuPAD. Most of the MuPAD objects are not needed in a given session and would only fill up the system.
- This strategy is transparent with respect to the usage of MuPAD objects. On slower computers, you may notice a delay on the first use of a function or domain.
- Using `Pref::verboseRead`, you can make MuPAD print information on files loaded automatically.

#### Option: All

- With this option (instead of some MuPAD object), all MuPAD objects will be initialized.

#### Example 1

Initializing all MuPAD objects takes a lot of time and greatly increases the memory requirements:

    >> bytes()

                            522304, 815604, 2147483647

    >> prog::init(All):

Check the memory usage again:

    >> bytes()

                          15990660, 16507016, 2147483647

#### Example 2

Using `Pref::verboseRead`, we obtain information on what is loaded by the system:

    >> reset():
       Pref::verboseRead(2):
       prog::init(prog::trace)

          loading package 'prog' [lib/]
          reading file lib/PROG/checkini.mu
          reading file lib/PROG/trace.mu

#### Changes

- new function

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000