Of those, I personally like hansl & printf much better. It's taken me a while to
get used to (s)printf and it still occasionally gives me the irrits, but the more I play
around with it the easier it gets.
Fwiw,
PS
-----Original Message-----
From: gretl-devel-bounces(a)lists.wfu.edu [mailto:gretl-devel-
bounces(a)lists.wfu.edu] On Behalf Of Allin Cottrell
Sent: Monday, September 19, 2016 5:12 PM
To: Gretl development
Subject: [Gretl-devel] printf poll?
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