NetLogo Help: links-own list ln log loop lput

### links-own

#### links-own [var1 ...] <link-breeds>-own [var1 ...]

The links-own keyword, like the globals, breed, <breeds>-own, turtles-own, and patches-own keywords, can only be used at the beginning of a program, before any function definitions. It defines the variables belonging to each link.

If you specify a breed instead of "links", only links of that breed have the listed variables. (More than one link breed may list the same variable.)

    undirected-link-breed [sidewalks sidewalk]
    directed-link-breed [streets street]
    links-own [traffic]   ;; applies to all breeds
    sidewalks-own [pedestrians]
    streets-own [cars bikes]

### list1.0

#### list value1 value2 (list value1 ...)

Reports a list containing the given items. The items can be of any type, produced by any kind of reporter.

    show list (random 10) (random 10)
    => [4 9]  ;; or similar list
    show (list 5)
    => [5]
    show (list (random 10) 1 2 3 (random 10))
    => [4 1 2 3 9]  ;; or similar list

### ln1.0

#### ln number

Reports the natural logarithm of number, that is, the logarithm to the base e (2.71828...).

See also e, log.

### log1.0

#### log number base

Reports the logarithm of number in base base.

    show log 64 2
    => 6

See also ln.

### loop1.0

#### loop [ commands ]

Repeats the commands forever, or until the enclosing procedure exits through use of the stop or report commands.

    to move-to-world-edge  ;; turtle procedure
      loop [
        if not can-move? 1 [ stop ]
        fd 1
      ]
    end

In this example, `stop` exits not just the loop, but the entire procedure.

Note: in many circumstances, it is more appropriate to use a forever button to repeat something indefinitely. See Buttons in the Programming Guide.

### lput1.0

#### lput value list

Adds value to the end of a list and reports the new list.

    ;; suppose mylist is [2 7 10 "Bob"]
    set mylist lput 42 mylist
    ;; mylist now is [2 7 10 "Bob" 42]

Take me to the full NetLogo Dictionary