11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Caché</strong> <strong>ObjectScript</strong> CommandsNEWCreates empty local variable environment.NEW:pc newargument,...N:pc newargument,...where newargument can be:variable,...or(variable,...)ArgumentspcvariableOptional — A postconditional expression.Optional — Name of variable(s) to be added to the existing local variableenvironment. The effect of a NEW on existing local variables dependson whether variable is enclosed in parentheses (exclusive NEW) or isnot enclosed in parentheses (inclusive NEW).DescriptionThe NEW command has two forms:• Without an argument• With an argumentNEW without an argument creates an empty local variable environment for a called subroutineor user-defined function. Existing local variable values are not available in this new localenvironment. They can be restored by returning to the previous local environment.The action NEW with an argument performs depends on the argument form you use.• NEW variable (inclusive NEW) retains the existing local variable environment and addsthe specified variable(s) to it. If any of the specified local variables has the same nameas an existing local variable, the old value for that named variable is no longer accessiblein the current environment.• NEW (variable) (exclusive NEW) replaces all existing variables in the local variableenvironment except the specified variable(s).94 <strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!