docServerUserLandCom picture
Contents
Frontier Site

table.uniqueName

Syntax table.uniqueName (prefix, tableAddr)

Params prefix is a string that's used in constructing the unique name.

tableAddr is the address of a table that's about to get a new element.

Action Creates a name, based on prefix, that is not already in use in the table.

Returns An address of an item in the table that doesn't exist, and is thus safe to assign to.

Examples table.uniqueName ("item", @scratchpad)

   » @scratchpad.item1

table.uniqueName ("item", @scratchpad)^ = 12

   » 12

table.uniqueName ("item", @scratchpad)

   » @scratchpad.item2

Notes Use this verb when you're adding an item to a table that contains several objects of the same type.

An example: you could use this verb to safely add an item to a table of file paths or Email accounts.


© Copyright 1992-2026 UserLand Software. Email: webmaster@userland.com.