1
0
Fork 0
forked from fun/fun

Added more exception handling after debugging ./examples/byte_for_demo.fun. (0.37.0)

This commit is contained in:
Johannes Findeisen 2025-12-10 23:27:06 +01:00
commit 26ddaf161e
12 changed files with 398 additions and 158 deletions

View file

@ -1,5 +1,14 @@
#!/usr/bin/env fun
/*
* This file is part of the Fun programming language.
* https://fun-lang.xyz/
*
* Copyright 2025 Johannes Findeisen <you@hanez.org>
* Licensed under the terms of the Apache-2.0 license.
* https://opensource.org/license/apache-2-0
*/
// Byte + for-loop demonstration
print("=== byte with hex literal and clamping ===")
@ -32,6 +41,11 @@ print(typeof(x)) // -> "String"
/* Expected output:
=== byte with hex literal and clamping ===
OverflowError: value out of range for uint8
*/
/* Expected output (OLD):
=== byte with hex literal and clamping ===
255
255
255