<remove>

Purpose/Function

Remove an entry from the environment.

Attributes

NAME

TYPE

DEFAULT VALUE

DESCRIPTION

name

java.lang.String

null

name of variable entry to remove

global

boolean

false

search only global frame

If global is false, the task will remove the first variable in scope with the given name.

Elements

None.

ReturnValues

DEFAULT NAME

TYPE

DESCRIPTION

removedValue

java.lang.Object

the value of the removed variable

Examples

<declare name="x" string="toBeRemoved"/>
<print-env/>
<remove name="x"/>
<print-env/>

The above example produces this trace:


1 [OgreScript:main] INFO ncsa.tools.ogrescript.tasks.OgreScriptBaseTask -
CONTENTS OF ENV: ogrescript
frame 0:
x=toBeRemoved
--------------------------------------------------------

8 [OgreScript:main] INFO ncsa.tools.ogrescript.tasks.OgreScriptBaseTask -
CONTENTS OF ENV: ogrescript
frame 0:
--------------------------------------------------------

  • No labels