Skip to content
FutureBlitz

    Install

    Import std.core.values

    Swap

    std.core.values

    function

    Public Function Swap<T>(ByRef a: T, ByRef b: T)

    Gives each of the two variables the other's value.

    Examples

    Local a = 1
    Local b = 2
    Swap(ByRef a, ByRef b)
    Expect(a == 2 && b == 1)

    std/core/values.fb, line 63

    Report an issue with this page or with FutureBlitz on GitHub.