Added echo to output data wthout a newline. (0.36.2)
This commit is contained in:
parent
b1e1160bff
commit
9fabf86e61
2 changed files with 35 additions and 0 deletions
23
examples/echo_example.fun
Executable file
23
examples/echo_example.fun
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/env fun
|
||||
|
||||
/*
|
||||
* This file is part of the Fun programming language.
|
||||
* https://fun-lang.xyz/
|
||||
*
|
||||
* Copyright 2025 Johannes Findeisen
|
||||
* Licensed under the terms of the Apache-2.0 license.
|
||||
* https://opensource.org/license/apache-2-0
|
||||
*
|
||||
* Added: 2025-12-10
|
||||
*/
|
||||
|
||||
// echo_example.fun
|
||||
// Demonstrates echo(expr) which prints without a trailing newline.
|
||||
|
||||
// Build a line without newline using echo, then finish with print to add newline
|
||||
echo("Hello, ")
|
||||
echo("world")
|
||||
print("!")
|
||||
|
||||
// Expected output:
|
||||
// Hello, world!
|
||||
Loading…
Add table
Add a link
Reference in a new issue