Socordia
  • Intro
    • The Compiler
  • The Basics
    • Variables
      • Arrays
    • Conditional Flow
    • Loops
    • Functions
    • Data
      • Casting
      • Enumerations
      • Ranges/Aliases
      • Structs
      • Tuples
      • Unit of Measure Types
  • Mixins
  • Accessibility
  • Primitive Datatypes
  • Extended
    • Conditional
    • Inline IL
    • Operator Overloading
    • Unions
    • OOP
      • Classes
      • Interfaces
Powered by GitBook
On this page
  1. The Basics
  2. Data

Tuples

A tuple is like an anonymous struct. It can hold values but it doesn't have a name. Tuples can be used to map or return multiple values. A tuple can hold up to 8 values.

Here is a simple example:

let myTuple : (i32, bool) = (42, true);
func doSomething() -> (i32, string) {
    return (1, "Some Error Occured");
}
PreviousStructsNextUnit of Measure Types

Last updated 5 months ago