This commit is contained in:
Ingy döt Net 2013-10-27 22:24:23 +00:00
parent 6f050a029e
commit 776bba907c
3887 changed files with 59894 additions and 7280 deletions

View file

@ -1,2 +1,2 @@
Fileappend, Hallo World!, print.txt
Fileappend, Hello World!, print.txt
Run, print "print.txt"

View file

@ -4,7 +4,7 @@
int main(){
std::ofstream lprFile;
lprFile.open( "/dev/lp0" );
lprFile << "Hello World\n";
lprFile << "Hello World!\n";
lprFile.close();
return 0;
}

View file

@ -0,0 +1,5 @@
SET PRINT ON
SET CONSOLE OFF
? "Hello World!"
SET PRINT OFF
SET CONSOLE ON

View file

@ -14,5 +14,5 @@ func main() {
defer lp0.Close()
fmt.Fprintln(lp0, "Hello world!")
fmt.Fprintln(lp0, "Hello World!")
}

View file

@ -1 +1 @@
new File('/dev/lp0').write('Hello World\n')
new File('/dev/lp0').write('Hello World!\n')

View file

@ -0,0 +1,6 @@
// This example runs on Node.js
var fs = require('fs');
// Assuming lp is at /dev/lp0
var lp = fs.openSync('/dev/lp0', 'w');
fs.writeSync(lp, 'Hello, world!\n');
fs.close(lp);

View file

@ -0,0 +1,2 @@
document.write("Hello World!");
print(); //Opens a dialog.

View file

@ -1,4 +1,5 @@
given open '>', '/dev/lp0' {
.say('Hello, World!');
given open '/dev/lp0', :w { # Open the device for writing as the default
.say('Hello World!'); # Send it the string
.close;
# ^ The prefix "." says "use the default device here"
}

View file

@ -0,0 +1,12 @@
import java.awt.print.PrinterException
import javax.swing.JTextPane
object LinePrinter0 extends App {
val show = false
val text = """Hello, World! in printing."""
try // Default Helvetica, 12p
new JTextPane() { setText(text) }.print(null, null, show, null, null, show)
catch {
case ex: PrinterException => ex.getMessage()
}
}

View file

@ -0,0 +1,8 @@
object LinePrinter extends App {
import java.io.{ FileWriter, IOException }
{
val lp0 = new FileWriter("/dev/lp0")
lp0.write("Hello, world!")
lp0.close()
}
}