=pod =encoding utf8 =head1 NAME Muldis::D::Core::STDIO - Muldis D routines for basic command-line user I/O =head1 VERSION This document is Muldis::D::Core::STDIO version 0.148.0. =head1 PREFACE This document is part of the Muldis D language specification, whose root document is L; you should read that root document before you read this one, which provides subservient details. Moreover, you should read the L document before this current document, as that forms its own tree beneath a root document branch. =head1 DESCRIPTION This document defines all of the core Muldis D routines that provide basic command-line user input/output. I =head1 GENERIC SYSTEM-SERVICES FOR STANDARD I/O These system-services are provided so Muldis D can do basic user input/output by itself, using standard input and standard output, like any general purpose programming language, and help satisfy its need to be computationally complete. For now they just work with plain (Unicode) text data, so one can implement a basic command-line program interface, or do basic invoker-setup file piping, as well as display diagnostics to standard error. These routines are not exhaustive, and their details are subject to future revision. =head2 sys.std.Core.STDIO.end_of_line_Text C This system-service routine will update the variable supplied as its C argument so that it holds the same implementation-defined end-of-line character or character sequence that C appends to its output, and that C looks out for to terminate its input. The purpose of this routine is to support users that want to catenate Text within Muldis D for output with a single C that is intended to display over multiple implementation-defined lines. =head2 sys.std.Core.STDIO.read_Text C This system-service routine will attempt to read C characters from standard input as a single C value, blocking the current in-DBMS process until it finishes, and then update the variable supplied as its C argument so that it holds the read value. The routine will only fetch fewer than the requested number of characters if the input stream is closed first. This routine will throw an exception if any system errors occur. =head2 sys.std.Core.STDIO.read_Text_line C This system-service routine is the same as C except that it will read from standard input until an implementation-defined end-of-line character is read, rather than reading a fixed number of characters; this end-of-line character will not be included in the read C value. If the C argument is C, then this routine will keep reading lines from standard input until it reads a non-empty line, and then C is only updated to hold that last non-empty line; otherwise, this routine will end as soon as one line is read, even if it is empty. =head2 sys.std.Core.STDIO.write_Text C This system-service routine will attempt to write the characters of its C argument to standard output, blocking the current in-DBMS process until it finishes. This routine will throw an exception if any system errors occur. =head2 sys.std.Core.STDIO.write_Text_line C This system-service routine is the same as C except that it will additionally write an implementation-defined end-of-line character after writing C. If the C argument is omitted, then this routine simply writes the end-of-line. =head2 sys.std.Core.STDIO.prompt_Text_line C This system-service routine is a wrapper over first invoking C with its C argument and then invoking C with its C argument. A true C argument will result in I of the wrapped routines being invoked repeatedly, not just C. =head2 sys.std.Core.STDIO.error_Text C This system-service routine is the same as C except that it will write to standard error rather than standard output. =head2 sys.std.Core.STDIO.error_Text_line C This system-service routine is the same as C except that it will write to standard error rather than standard output. =head1 SEE ALSO Go to L for the majority of distribution-internal references, and L for the majority of distribution-external references. =head1 AUTHOR Darren Duncan (C) =head1 LICENSE AND COPYRIGHT This file is part of the formal specification of the Muldis D language. Muldis D is Copyright © 2002-2011, Muldis Data Systems, Inc. See the LICENSE AND COPYRIGHT of L for details. =head1 TRADEMARK POLICY The TRADEMARK POLICY in L applies to this file too. =head1 ACKNOWLEDGEMENTS The ACKNOWLEDGEMENTS in L apply to this file too. =cut