Stata 15 help for nopreserve_option

[P] nopreserve option -- nopreserve option

Syntax

stata_command ... [, ... nopreserve ...]

Description

Some Stata commands have a nopreserve option. This option is for use by programmers when stata_command is used as a subroutine of another command.

Option

nopreserve specifies that stata_command need not bother to preserve the data in memory. The usual situation is that stata_command is being used as a subroutine by another program, the data in memory have been preserved by the caller, and the caller will not need to access the data again before the data are restored from the caller's preserved copy.

Remarks

Some commands change the data in memory in the process of performing their task even though the command officially does not change the data in memory. Such commands achieve this by using preserve to make a temporary copy of the data on disk, which is later restored to memory.

Even some commands whose entire purpose is to make a modification to the data in memory sometimes make temporary copies of the data just in case the user should press Break while the changes to the data are still being completed.

This is done using preserve; see [P] preserve.

Assume alpha and beta are each implemented using preserve. Assume that alpha uses beta as a subroutine. If alpha itself does not intend to use the data after calling beta, then beta preserving and restoring the data is unnecessary because alpha already has preserved the data from which memory will be restored. Then alpha should specify the nopreserve option when calling beta.


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index