w3RotatorAdd

Syntax   Parameters   Example Program   Examples

w3RotatorAdd adds a value to the specified list. The first time a process retrieves a value using w3RotatorGet, the list is copied into memory. Changes made to a list after the first time a process uses the list are not reflected in the copy of the list already in use. Use w3RotatorClear to remove the copy stored by the process. When a process logs off, the copy in memory is deleted.

Syntax

call w3RotatorAdd (list, weight, value)

Parameters

list

In

The name of the list of values to add a value to. If "" is passed, the list is named after the program which called w3RotatorAdd.

weight

In

Controls how often this value should be returned by w3RotatorGet. The larger the weight, the more likely the entry will be displayed.  The retrieval calculation is:

 total = sum of all the weights in the list

retrieval probability = the entry's weight / total.

value

In

The value added to the list. This value must be a single attribute.

Example Program

w3Rotator.demo

Examples

*call w3RotatorAdd("jack", 10, "Will display about 25% of the time")

*call w3RotatorAdd("jack", 30, "Will display about 75% of the time")