User Tools

Site Tools


4rpl:commands:createlist

Index
Lists

CreateList

CreateList ->list

Description

Creates an empty list and pushes it onto the stack. If saved in a variable, then whatever was in that variable previously gets dropped (and garbage collected) and replaced with the new list just created.

:WARNING: If you do the following, or something similar: CreateList dup ->list1 ->list2 The list assigned to each var will ALWAYS be the same. Therefore, any changes applied to either variable will affect both.

Examples

if (CreateList GetListCount eq0)
    Trace("And lo, the list was empty.")
endif
 
createlist ->list
1 ->list[0]
4 ->list[1]
9 ->list[2]
trace(<-list)

Index

4rpl/commands/createlist.txt · Last modified: 2024/02/14 21:18 by digitalizedMind