Thanks for using Compiler Explorer
Sponsors
Jakt
C++
Ada
Analysis
Android Java
Android Kotlin
Assembly
C
C3
Carbon
C++ (Circle)
CIRCT
Clean
CMake
CMakeScript
COBOL
C++ for OpenCL
MLIR
Cppx
Cppx-Blue
Cppx-Gold
Cpp2-cppfront
Crystal
C#
CUDA C++
D
Dart
Elixir
Erlang
Fortran
F#
GLSL
Go
Haskell
HLSL
Hook
Hylo
IL
ispc
Java
Julia
Kotlin
LLVM IR
LLVM MIR
Modula-2
Nim
Objective-C
Objective-C++
OCaml
Odin
OpenCL C
Pascal
Pony
Python
Racket
Ruby
Rust
Snowball
Scala
Slang
Solidity
Spice
SPIR-V
Swift
LLVM TableGen
Toit
TypeScript Native
V
Vala
Visual Basic
Vyper
WASM
Zig
Javascript
GIMPLE
Ygen
snowball source #1
Output
Compile to binary object
Link to binary
Execute the code
Intel asm syntax
Demangle identifiers
Verbose demangling
Filters
Unused labels
Library functions
Directives
Comments
Horizontal whitespace
Debug intrinsics
Compiler
snowball 0.1.0
Options
Source code
// Snowball compiler (MIT) /l、 // https://github.com/snowball-lang/snowball (゚、 。7 // ⠀ l、゙~ヽ // Vectors example for the lang じし(_,)ノ // Docs: https://snowball-lang.gitbook.io/docs/ // This example shows how to use vectors in Snowball. // Vectors are dynamic arrays that can be resized at runtime. // They are generic, so you can store any type of data in them. import Core::System; public func main() i32 { let mut vec = new Vector<i32>(); // To add an element to the vector, use the `push` method. vec.push(42); // To get the size of the vector, use the `size` method. // To get an element from the vector, use the `[]` operator. System::println(vec[0]); System::println(vec.size()); }
Become a Patron
Sponsor on GitHub
Donate via PayPal
Source on GitHub
Mailing list
Installed libraries
Wiki
Report an issue
How it works
Contact the author
CE on Mastodon
CE on Bluesky
About the author
Statistics
Changelog
Version tree