emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] ob-csharp


From: thomas
Subject: Re: [O] ob-csharp
Date: Mon, 06 Jun 2016 08:56:30 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.8.0

Hi,

I'm sorry, I could not find the time yet to figure out how to "officially" contribute to Emacs (the papers are signed, though).

In the meantime you can find ob-csharp on github:

https://github.com/thomas-villagers/ob-csharp

- thomas



On 07.09.2015 19:23, thomas wrote:
Hi,

could not find ob-csharp in org mode. I created one to make the pointy haired boss happy.

It's based on Eric's ob-java.el with some bits taken from other ob files.

It works for the simple examples following below.

Hope this is useful and I'm open for hints to improve the code.

- thomas



* ob-csharp Tests

** Hello World

#+BEGIN_SRC csharp
class HelloWorld {
  public static void Main()
  {
    System.Console.WriteLine("Hello World!");
  }
}
#+END_SRC

#+RESULTS:
: Hello World!



** Tables

#+BEGIN_SRC csharp
class Table {
  public static void Main()
  {
    for (char  c = 'a'; c < 'd'; c++)
      System.Console.Write("{0} ",c);
    System.Console.WriteLine();
    for (int i = 0; i < 3; i++)
      System.Console.Write("{0} ",i);
  }
}
#+END_SRC

#+RESULTS:
| a | b | c |
| 0 | 1 | 2 |

** Compiler flags and command line args

#+BEGIN_SRC csharp :cmpflag -warnaserror+
public class TestFlags {
  public static void Main()
  {
   int i;  // unused; throw error
   System.Console.WriteLine("You won't see this!");
  }
}
#+END_SRC

#+RESULTS:

#+BEGIN_SRC csharp :results verbatim  :cmdline --version
public class TestCmd {
  public static void Main()
  {
   System.Console.WriteLine("You won't see this!");
  }
}
#+END_SRC

#+RESULTS:
#+begin_example
Mono JIT compiler version 3.2.8 (Debian 3.2.8+dfsg-10)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
    TLS:           __thread
    SIGSEGV:       altstack
    Notifications: epoll
    Architecture:  amd64
    Disabled:      none
    Misc:          softdebug
    LLVM:          supported, not enabled.
    GC:            sgen
#+end_example






reply via email to

[Prev in Thread] Current Thread [Next in Thread]