Go to the first, previous, next, last section, table of contents.


Runtime Environment

Introduction for Runtime Environment

maxima-init.mac is a file which is loaded automatically when Maxima starts. You can use maxima-init.mac to customize your Maxima environment. maxima-init.mac, if it exists, is typically placed in the directory named by :lisp (default-userdir), although it can be in any directory searched by the function file_search.

Here is an example maxima-init.mac file:

setup_autoload ("specfun.mac", ultraspherical, assoc_legendre_p);
showtime:all;

In this example, setup_autoload tells Maxima to load the specified file (specfun.mac) if any of the functions (ultraspherical, assoc_legendre_p) are called but not yet defined. Thus you needn't remember to load the file before calling the functions.

The statement showtime: all tells Maxima to set the showtime variable. The maxima-init.mac file can contain any other assignments or other Maxima statements.

Interrupts

The user can stop a time-consuming computation with the ^C (control-C) character. The default action is to stop the computation and print another user prompt. In this case, it is not possible to restart a stopped computation.

If the variable *debugger-hook* is set to nil, by executing

:lisp (setq *debugger-hook* nil)

then upon receiving ^C, Maxima will enter the Lisp debugger, and the user may use the debugger to inspect the Lisp environment. The stopped computation can be restarted by entering continue in the Lisp debugger. The means of returning to Maxima from the Lisp debugger (other than running the computation to completion) is different for each version of Lisp.

On Unix systems, the character ^Z (control-Z) causes Maxima to stop altogether, and control is returned to the shell prompt. The fg command causes Maxima to resume from the point at which it was stopped.

Definitions for Runtime Environment

Declaration: feature
Maxima understands two distinct types of features, system features and features which apply to mathematical expressions. See also status for information about system features. See also features and featurep for information about mathematical features.

feature itself is not the name of a function or variable.

Function: featurep (a, f)
Attempts to determine whether the object a has the feature f on the basis of the facts in the current database. If so, it returns true, else false.

Note that featurep returns false when neither f nor the negation of f can be established.

featurep evaluates its argument.

See also declare and features.

(%i1) declare (j, even)$
(%i2) featurep (j, integer);
(%o2)                           true

Function: room ()
Function: room (true)
Function: room (false)
Prints out a description of the state of storage and stack management in Maxima. room calls the Lisp function of the same name.

Function: status (feature)
Function: status (feature, putative_feature)
Function: status (status)
Returns information about the presence or absence of certain system-dependent features.

The variable features contains a list of features which apply to mathematical expressions. See features and featurep for more information.

Function: time (%o1, %o2, %o3, ...)
Returns a list of the times, in seconds, taken to compute the output lines %o1, %o2, %o3, .... The time returned is Maxima's estimate of the internal computation time, not the elapsed time. time can only be applied to output line variables; for any other variables, time returns unknown.

Set showtime: true to make Maxima print out the computation time and elapsed time with each output line.


Go to the first, previous, next, last section, table of contents.