Programmer Guide/Command Reference/DELETE: Difference between revisions

From STX Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 8: Line 8:
;<var>/Variables</var>: Indicates that the <var>itemname1</var>...<var>itemnamen</var>  arguments are variable names. In this case, each itemname is interpreted as the name of a shell item. The respective shell items are deleted, and the variables are then reset to empty.
;<var>/Variables</var>: Indicates that the <var>itemname1</var>...<var>itemnamen</var>  arguments are variable names. In this case, each itemname is interpreted as the name of a shell item. The respective shell items are deleted, and the variables are then reset to empty.


  // create a table item called "hugoItem"
  // create a table item called "hugoItem", and store
  #hugo := new table hugoItem    // now, "#hugo" will contain the string "hugoItem"
  // this name in a variable called "#hugo"
  delete /Var #hugo               // table item "hugoItem" will be deleted *and* "#hugo" will be cleared
  #hugo := new table hugoItem
 
// table item "hugoItem" will be deleted *and* "#hugo" will be cleared
delete /Var #hugo
<!-- C.G. 15.3.2011 -->
<!-- C.G. 15.3.2011 -->

Revision as of 14:09, 15 March 2011

DELETE [ /Variables ] [ /Silent ] [ /- ] itemname1 [ itemname2 ... ]

The DELETE command deletes the specified shell items itemname1, itemname2, and so on. Some types of shell items (e.g. SPU items) cannot be deleted while they are active, causing an error to be emitted. If a display item is deleted, all items contained in the display are removed too (i.e. graphs and dialogs items). If a dialog item contained in a 'dialog only' display item is deleted, the display item is also removed. If a DDE-conversation item (DDEConv) is removed, the conversation is ended before the item is deleted.

itemname
The name of the shell item to delete.
/Silent
If specified, DELETE will generate a warning rather than an error if arguments are missing or it is unable delete the arguments.
/Variables
Indicates that the itemname1...itemnamen arguments are variable names. In this case, each itemname is interpreted as the name of a shell item. The respective shell items are deleted, and the variables are then reset to empty.
// create a table item called "hugoItem", and store
// this name in a variable called "#hugo"
#hugo := new table hugoItem
// table item "hugoItem" will be deleted *and* "#hugo" will be cleared
delete /Var #hugo

Navigation menu

Personal tools