mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-12-01 23:59:22 -06:00
23 lines
813 B
Plaintext
23 lines
813 B
Plaintext
// Snowball compiler (MIT) /l、
|
||
// https://github.com/snowball-lang/snowball (゚、 。7
|
||
// ⠀ l、゙~ヽ
|
||
// Print numbers as hexadecimal じし(_,)ノ
|
||
// Docs: https://snowball-lang.gitbook.io/docs/
|
||
|
||
// Import the core library.
|
||
// This is required for the println function.
|
||
import std::io;
|
||
|
||
// The main function is the entry point of the program.
|
||
// It is called when the program is started.
|
||
public func main() i32 {
|
||
// This is a function from the standard library.
|
||
// It prints the given string to the console.
|
||
|
||
// Let's convert the some numbers to hexadecimal.
|
||
io::println(87612.hex());
|
||
io::println(0x1234.hex());
|
||
io::println(0b10101010.hex());
|
||
io::println(0XFFAA.hex());
|
||
}
|