-
-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No newlines in SPARC #647
Comments
Here's the bits of Rcpp's stream buffer implementation that are probably relevant here: Rcpp/inst/include/Rcpp/iostream/Rstreambuf.h Lines 60 to 67 in d38a304
Perhaps something funky is going on with how that stream buffer is receiving input? Do you see the same issue with |
Same issue with void rcpp_hello_world() {
std::ostringstream end;
end << "\n";
Rcpp::Rcout << "hello world!" << end.str();
Rcpp::Rcout << "another hello world!" << end.str();
} And so does this: void rcpp_hello_world() {
Rcpp::Rcout << "hello world!\n";
Rcpp::Rcout << "another hello world!\n";
}
EDIT: But |
Another test I made: void rcpp_hello_world() {
Rcpp::Rcout << "hello world!" << std::endl << "X";
Rcpp::Rcout << "another hello world!" << std::endl << "X";
} prints -bash-3.2$ Rscript -e "test::rcpp_hello_world()"
hello world!Xanother hello world!X-bash-3.2$ Which means that |
Unfortunately no -- since none of us have access to a SPARC machine, it's unlikely that we'll be able to help debug further. My only suggestion would be for you to copy the and try playing around with that until you get the expected output. |
close #647: fixed single-character handling in Rstreambuf
I got my hands on a SPARC machine and I've detected that a
std::endl
issued withRcpp::Rcout
is not printed. I've done the following:Rcpp::Rcpp.package.skeleton("test")
.src/rcpp_hello_world.cpp
as follows:R CMD build test
.No newlines! (I've verified that a simple C++ program using
std::cout
prints the newlines).The text was updated successfully, but these errors were encountered: