User Tools

Site Tools


4rpl:commands:createlist

This is an old revision of the document!


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 anything similar: CreateList dup ->list1 ->list2 The lists will actually be the same, just with different variables.

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.1707940503.txt.gz · Last modified: 2024/02/14 14:55 by digitalizedMind