Just another update

This commit is contained in:
Ingy döt Net 2015-02-20 00:35:01 -05:00
parent a25938f123
commit 00a190b0a6
6591 changed files with 94363 additions and 23227 deletions

View file

@ -1,3 +1,21 @@
{{selection|Short Circuit|Console Program Basics}}A common practice in computing is to send error messages to a different output stream than [[User Output - text|normal text console messages]]. The normal messages print to what is called "standard output" or "standard out". The error messages print to "standard error". This separation can be used to redirect error messages to a different place than normal messages.
{{selection|Short Circuit|Console Program Basics}}
[[Category:Streams]]
{{omit from|Applesoft BASIC}}
{{omit from|bc|Always prints to standard output.}}
{{omit from|Brainf***}}
{{omit from|dc|Always prints to standard output.}}
{{omit from|GUISS|Cannot customize error messages}}
{{omit from|Integer BASIC}}
{{omit from|TI-83 BASIC|Same reason as TI-89.}}
{{omit from|TI-89 BASIC|no analogue to stderr, unless you count graph display vs. program IO}}
{{omit from|Unlambda|No concept of standard error (or alternate output streams in general).}}
A common practice in computing is to send error messages
to a different output stream than [[User Output - text|normal text console messages]].
The normal messages print to what is called "standard output" or "standard out".
The error messages print to "standard error".
This separation can be used to redirect error messages to a different place than normal messages.
Show how to print a message to standard error by printing "Goodbye, World!" on that stream.

View file

@ -1 +1 @@
implement main () = fprint (stderr_ref, "Goodbye, World!\n")
implement main0 () = fprint (stderr_ref, "Goodbye, World!\n")

View file

@ -1,10 +1,5 @@
#include <iostream>
using std::cerr;
using std::endl;
int main () {
cerr << "Goodbye, World!" << endl;
return cerr.bad();
std::cerr << "Goodbye, World!\n";
}

View file

@ -1,4 +1,4 @@
//compile using the new dylan.NET v, 11.2.8.2 or later
//compile using the new dylan.NET v, 11.5.1.2 or later
//use mono to run the compiler
#refstdasm mscorlib.dll
@ -7,7 +7,7 @@ import System
assembly stderrex exe
ver 1.1.0.0
class public auto ansi Module1
class public Program
method public static void main()
Console::get_Error()::WriteLine("Goodbye World!")

View file

@ -0,0 +1 @@
staticJava["java.lang.System","err"].println["Goodbye, World!"]

View file

@ -1 +1 @@
say "Goodbye, World!"
call lineout 'STDERR', "Goodbye, World!"

View file

@ -1 +1,2 @@
call lineout ,"Goodbye, World!"
msgText = 'Goodbye, World!'
call charout 'STDERR', msgText

View file

@ -1 +1,14 @@
call charout ,"Goodbye, World!"
/* REXX ---------------------------------------------------------------
* 07.07.2014 Walter Pachl
* enter the appropriate command shown in a command prompt.
* "rexx serr.rex 2>err.txt"
* or "regina serr.rex 2>err.txt"
* 2>file will redirect the stderr stream to the specified file.
* I don't know any other way to catch this stream
*--------------------------------------------------------------------*/
Parse Version v
Say v
Call lineout 'stderr','Good bye, world!'
Call lineout ,'Hello, world!'
Say 'and this is the error output:'
'type err.txt'

View file

@ -0,0 +1,7 @@
#![allow(unused_must_use)]
use std::io;
fn main() {
let mut stderr = io::stderr();
stderr.write(bytes!("Goodbye, World!\n"));
}

View file

@ -0,0 +1 @@
RAISERROR 'Goodbye, World!', 16, 1