I'll take the gretl version as well.
Lee
On Mon, Sep 19, 2016 at 4:12 PM, Allin Cottrell <cottrell(a)wfu.edu> wrote:
Coming off Sven's posting at
http://lists.wfu.edu/pipermail/gretl-devel/2016-September/006903.html
I'd like to show a couple of real-world examples of alternatives to
"good old" printf in the econometrics domain.
I'd be interested to hear what people think of the comparison. If lots of
people tell me they still think printf sucks, than I guess I'll have to
rethink.
<hansl>
set echo off
set messages off
# hansl, using printf
h = 8
w = 6
printf "Henry the %gth had %g wives\n", h, w
vname = "dispinc"
b = 0.9307
se = 0.0421
printf "The coefficient on %s is %g, with std error %g\n",
vname, b, se
foreign language=R
h <- 8
w <- 6
cat(paste("Henry the", h, "th had", w, "wives\n"))
vname <- "dispinc"
b <- 0.9307
se <- 0.0421
cat(paste("The coefficient on", vname, "is", b, ", with std
error",
se, "\n"))
end foreign
foreign language=Ox
#include <oxstd.h>
main() {
decl h = 8;
decl w = 6;
print("Henry the ", h, "th had ", w, " wives\n");
decl vname = "dispinc";
decl b = 0.9307;
decl se = 0.0421;
print("The coefficient on ", vname, " is ", b, " with std
error ",
se, "\n");
}
end foreign
</hansl>
Allin
_______________________________________________
Gretl-devel mailing list
Gretl-devel(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-devel
--
Lee Adkins
Professor of Economics and Department Head
Economics and Legal Studies in Business
Oklahoma State University
Email: lee.adkins(a)okstate.edu
Fax: 405-744-5180
Phone: 405-744-5196
URL: