From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roger Mason Subject: C code block: no return values Date: Tue, 16 Apr 2013 13:23:33 -0230 Message-ID: <516D73FD.8000206@mun.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35680) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1US8CX-0005KM-5g for emacs-orgmode@gnu.org; Tue, 16 Apr 2013 11:53:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1US8CN-0001ug-QD for emacs-orgmode@gnu.org; Tue, 16 Apr 2013 11:53:45 -0400 Received: from nina.ucs.mun.ca ([134.153.232.76]:60050) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1US8CN-0001uA-LL for emacs-orgmode@gnu.org; Tue, 16 Apr 2013 11:53:35 -0400 Received: from [134.153.37.33] (cryptoperthite.esd.mun.ca [134.153.37.33]) (authenticated bits=0) by nina.ucs.mun.ca (8.13.1/8.13.1) with ESMTP id r3GFrXJd005401 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 16 Apr 2013 13:23:34 -0230 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hello, I'm working through examples in "A Multi-Language Computing Environment for Literate Programming and Reproducible Research" by Shulte et al. J. Stat. Software, 46/3, 2012. This example compiles but results are not returned to the Org-mode buffer: ======================================================== #+name: cocktail.c #+begin_src C :noweb yes :tangle cocktail.c #include <> <
> #+end_src #+name: main #+begin_src C int main(int argc, char *argv[]) { int lst[argc-1]; int i; for(i=1;i> } if ( swapped == 0 ) break; swapped = 0; for(i= l - 2; i >= 0; i--) { <> } } while(swapped > 0); } #+end_src #+name: swap #+begin_src C if ( a[i] > a[i+1] ) { int temp = a[i]; a[i] = a[i+1]; a[i+1] = temp; swapped = 1; } #+end_src #+call: cocktail.c[:cmdline 8 7 6 3 2 4 78]() =========================================== Running C-c on the "call" line above produces: =============================== #+RESULTS: cocktail.c[:cmdline 8 7 6 3 2 4 78]() ================================ The answers should be here. But they aren't. Thanks for any help. Roger This electronic communication is governed by the terms and conditions at http://www.mun.ca/cc/policies/electronic_communications_disclaimer_2012.php