ProtoLang.net

Reference: Delete

☰ Hide Sidebar
TOKEN DELETE
ALIAS None

The Delete Command is used to delete a variable from the current scope's memory (Read about scope in Functions).

Syntax

The short syntax structure uses the word DELETE:

DELETE VARIABLE

The long syntax structure uses the word DELETE:

DELETE VARIABLE

Examples

Example: Deleting Variable

NEW INT x = 5
NEW INT y = 10
DELETE x // x is deleted and does not exist
PRINT y // y still exists

Common Errors

Error: Deleting non-existent Variable

DELETE x // Runtime error! Variable "x" does not exist!
NEW INT x = 5 // This line is not executed because the program crashed!