Programmer Guide/Command Reference/DELETE: Difference between revisions

From STX Wiki
Jump to navigationJump to search
No edit summary
mNo edit summary
 
(21 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
  DELETE [ /Variables ] [ /Silent ] [ [[Programmer_Guide/Command_Reference/-|/-]] ] <var>itemname1</var> [ <var>itemname2 ...</var> ]
Delete [[Programmer_Guide/Shell_Items|shell items]].
==Usage==
  DELETE [ [[Programmer_Guide/Command_Reference_Options/Variables|/Variables]] ] [/unprotect] [ /Silent | [[Programmer_Guide/Command_Reference_Options/Silent|/?]] ] [ [[Programmer_Guide/Command_Reference_Options/-|/-]] ] <var>item<sub>1</sub></var> [ <var>item<sub>2</sub></var> &hellip; ]
;<var>item<sub>1</sub></var>, <var>item<sub>2</sub></var>: name of the shell item to delete or name of a variable containing the name of shell item to delete (if <code>/Variable</code> is specified)
;<code>/Silent</code>: If specified, <code>DELETE</code> will generate a warning rather than an error if arguments are missing or if it is unable delete the arguments.
;<code>/unprotect</code> (case-sensitive!): If specified, <code>DELETE</code> will remove any protection from the respective item before deleting. This is the only way of deleting a [[Programmer_Guide/Shell_Items#Protected_shell_items|protected shell item]]. Note that, unlike most other options, the <code>/unprotect</code> option is case-sensitive meaning that you have to use the ''lower-case'' letter '''u''' to indicate that you are really serious.
;<code>/Variables</code>: Indicates that the arguments are variable names containing the shell item name. The respective shell items are deleted, and the variables are then reset to empty.


The <code>DELETE</code> command deletes the specified shell items <var>itemname1</var>, <var>itemname2</var>, 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.
The <code>DELETE</code> command deletes the specified shell items. Some types of shell items (e.g. [[Programmer_Guide/Shell_Items/SPU|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.  


;<var>itemname</var> :The name of the shell item to delete.
The completion code of the command (0 for success) is assiged to the variable <var>RC</var> and is also returned as result of the command.
;<var>/Silent</var> :If specified, <code>DELETE</code> will generate a warning rather than an error if arguments are missing or it is unable delete the arguments.
;<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"
==See also==
  #hugo := new table hugoItem    // now, "#hugo" will contain the string "hugoItem"
[[Programmer_Guide/Shell_Items|shell items]], [[../NEW|NEW]], [[../SET|SET]]
  delete /Var #hugo               // table item "hugoItem" will be deleted *and* "#hugo" will be cleared
==Examples==
<!-- C.G. 15.3.2011 -->
  // 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
<!-- C.G. 21.3.2011 -->
<!-- C.G. 27.4.2011 -->

Latest revision as of 07:52, 25 October 2016

Delete shell items.

Usage

DELETE [ /Variables ] [/unprotect] [ /Silent | /? ] [ /- ] item1 [ item2 … ]
item1, item2
name of the shell item to delete or name of a variable containing the name of shell item to delete (if /Variable is specified)
/Silent
If specified, DELETE will generate a warning rather than an error if arguments are missing or if it is unable delete the arguments.
/unprotect (case-sensitive!)
If specified, DELETE will remove any protection from the respective item before deleting. This is the only way of deleting a protected shell item. Note that, unlike most other options, the /unprotect option is case-sensitive meaning that you have to use the lower-case letter u to indicate that you are really serious.
/Variables
Indicates that the arguments are variable names containing the shell item name. The respective shell items are deleted, and the variables are then reset to empty.

The DELETE command deletes the specified shell items. 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.

The completion code of the command (0 for success) is assiged to the variable RC and is also returned as result of the command.

See also

shell items, NEW, SET

Examples

// 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