logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

delete-tree - (tree)

Description

delete-tree will search <tree> for string <key> and if found, delete its node (including the key in it), set <value> (in "value" clause) to node's value, and set <status> number (in "status" clause) to GG_OKAY. If <key> is not found, <status> will be GG_ERR_EXIST. If <status> is not GG_OKAY, <value> is unchanged.

Examples

Delete node with key "123", and obtain its value: set-string k = "123" delete-tree mytree key k value val status st if-true st not-equal GG_OKAY @Could not find key <<print-out k>> exit-handler end-if // display key/value deleted @Deleted key <<print-out k>> with value <<print-out val>> // delete the original value delete-string val

Name

delete-tree - (tree)

Purpose

Delete a node from a tree.

See Also

Tree delete-treeget-treenew-treepurge-treeread-treeuse-cursorwrite-tree See all documentation $DATE $VERSION GOLF(2gg)

Syntax

delete-tree <tree> key <key> \ [ status <status> ] \ [ value <value> ] \

See Also