mirror of
https://github.com/carp-lang/Carp.git
synced 2024-10-26 13:51:50 +03:00
core: add IO.errorln and IO.error
This commit is contained in:
parent
e84018fe6c
commit
6e33a8c2f9
@ -7,6 +7,10 @@
|
||||
(register println (Fn [(Ref String)] ()))
|
||||
(doc print "prints a string ref to stdout, does not append a newline.")
|
||||
(register print (Fn [(Ref String)] ()))
|
||||
(doc errorln "prints a string ref to stderr, appends a newline.")
|
||||
(register errorln (Fn [(Ref String)] ()))
|
||||
(doc error "prints a string ref to stderr, does not append a newline.")
|
||||
(register print (Fn [(Ref String)] ()))
|
||||
(doc get-line "gets a line from stdin.")
|
||||
(register get-line (Fn [] String))
|
||||
(doc get-char "gets a character from stdin.")
|
||||
|
@ -6,6 +6,9 @@
|
||||
void IO_println(String *s) { puts(*s); }
|
||||
void IO_print(String *s) { printf("%s", *s); }
|
||||
|
||||
void IO_errorln(String *s) { fprintf(stderr, "%s\n", *s); }
|
||||
void IO_error(String *s) { fprintf(stderr, "%s", *s); }
|
||||
|
||||
char IO_EOF = (char) EOF;
|
||||
|
||||
#ifndef _WIN32
|
||||
|
Loading…
Reference in New Issue
Block a user