fuzion/sys/out.fz
# This file is part of the Fuzion language implementation.
#
# The Fuzion language implementation is free software: you can redistribute it
# and/or modify it under the terms of the GNU General Public License as published
# by the Free Software Foundation, version 3 of the License.
#
# The Fuzion language implementation is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
# License for more details.
#
# You should have received a copy of the GNU General Public License along with The
# Fuzion language implementation. If not, see <https://www.gnu.org/licenses/>.
# -----------------------------------------------------------------------
#
# Tokiwa Software GmbH, Germany
#
# Source code of Fuzion standard library feature fuzion.sys.out
#
# Author: Fridtjof Siebert (siebert@tokiwa.software)
#
# -----------------------------------------------------------------------
# fuzion.sys.out -- unit type grouping routines to print to stdout
#
module out : character_encodings is
module print(s Any) =>
write s.as_string.utf8.as_array
module println(s Any) =>
write (s.as_string.utf8 ++ [ascii.lf]).as_array
module println =>
write [ascii.lf]
module stdout i64 => intrinsic
private write(arr array u8) =>
_ := fuzion.sys.fileio.write stdout arr
last changed: 2024-03-07