VerseIsland
Feed Learn Leaderboard Guides Reference Explore Search Docs Verse Library
Sign in
Feed Learn 📖 Codex Leaderboard Guides Reference Explore Search Docs Verse Library
Fortnite › Verse Language · Up to Fortnite · Verse Language · 92 of 570 in Verse Language
Browse Fortnite

Data Types in Verse

The type macro is a special Verse construct that can be used to define functions or construct new types from existing types using where clauses. The type macro can be used anywhere a type can be used. For example, the following example constructs a new type using a where clause, then uses that type in a function:

|  |  |
| --- | --- |
|  | # Construct a new type with a where clause |
|  | uint8 := type{X:int where 0 <= X, X < 256} |
|  |  |
|  | # Define a new function using uint8 |
|  | Foo():uint8 = 0 |

Construct a new type with a where clause

uint8 := type{X:int where 0 <= X, X < 256}

Define a new function using uint8

Foo():uint8 = 0

Copy full snippet(5 lines long)

There where clause is only supported in function parameter definitions or as a range condition on numeric types.

The following example uses the type macro to define a function as an argument to a new function:

|  |  |
| --- | --- |
|  | # Define a function with type |
|  | Bar(X:type{_():uint8}):uint8 = X() |
|  |  |
|  | # Call Bar with Foo argument |
|  | Y := Bar(Foo) |

Define a function with type

Bar(X:type{_():uint8}):uint8 = X()

Call Bar with Foo argument

Y := Bar(Foo)

You're reading a preview

The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.

Sign in with Discord — free for members Read the original at Epic Games

Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.

Comments

    Sign in to vote, comment, or suggest an edit. Sign in
    📄
    Source
    Epic Games

    © Epic Games. Official Epic developer documentation, shown here as a reference with a link to the original. All rights remain with Epic Games. Terms ↗

    View original Sources & licensing
    Request removal
    Last updated Mar 8, 2026
    Keep exploring
    More in Verse Language · 92 of 570
    Prev
    type casting and conversion in verse
    Next
    types in verse
    Browse all files in this folder (A–Z)
    Next up
    • Here, the [comparison expression
    Related topics
    • Type Macro In Verse Verse Language
    • Verse Language Quick Reference Verse Language
    • Verse Glossary Verse Language
    • Verse Glossary Verse Language
    • Void In Verse Verse Language

    Related

    Open in graph →

    Related topics

    • Type Macro In Verse
    • Verse Language Quick Reference
    • Verse Glossary
    • Verse Glossary
    • Void In Verse
    VerseIsland · an archipelago of Verse & UEFN knowledge
    🗺️ Island atlas Learn Guides History About & Press Sources & Licensing Status

    Not affiliated with Epic Games. Fortnite, UEFN, Unreal Engine, and Verse are trademarks of Epic Games, Inc. Content is attributed to its source — see Sources & Licensing.

    🦜

    Scout · your island guide

    The Isle of Verse