Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upNo newlines in SPARC #647
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::endlissued withRcpp::Rcoutis not printed. I've done the following:Rcpp::Rcpp.package.skeleton("test").src/rcpp_hello_world.cppas follows:R CMD build test.No newlines! (I've verified that a simple C++ program using
std::coutprints the newlines).