When using org-babel with mixed (double, int) input like below, the c file was not written correctly. The numbers where left out and only the commas where written.
I guess it was a typo. Attached is the patch. Jakob --- #+RESULTS[8894f01ba8e219bd6cafb49748f4d5cad8bb6fd1]: test-parameter | 1 | 2.3 | | 3 | 4.2 | #+begin_src cpp :var x=test-parameter :includes '("<iostream>") using namespace std; cout << "hallo" << endl; #+end_src
From baea909dd3e6d7e4c8eaa2c506a3c6f31c472f11 Mon Sep 17 00:00:00 2001 From: Jakob Lombacher <ja...@lombacher.net> Date: Thu, 27 Mar 2014 19:27:03 +0100 Subject: [PATCH] Bugfix, there was one entry too much. It failed when mixed (int double) table is used as input variable e.g | 1 | 1.2 | --- lisp/ob-C.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ob-C.el b/lisp/ob-C.el index 4c2d1ba..bbd0525 100644 --- a/lisp/ob-C.el +++ b/lisp/ob-C.el @@ -264,7 +264,7 @@ FORMAT can be either a format string or a function which is called with VAL." (when (and type (not (string= type-name tmp-type-name))) (if (and (member type-name '("int" "double" "int32_t")) (member tmp-type-name '("int" "double" "int32_t"))) - (setq tmp-type '("double" "" "%f")) + (setq tmp-type '("double" "%f")) (error "Only homogeneous lists are supported by C. You can not mix %s and %s" type-name tmp-type-name))) -- 1.9.1