[Mono-bugs] [Bug 553829] New: csharp should be usable as a command interpreter

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Nov 9 10:43:33 EST 2009


http://bugzilla.novell.com/show_bug.cgi?id=553829


           Summary: csharp should be usable as a command interpreter
    Classification: Mono
           Product: Mono: Compilers
           Version: SVN
          Platform: x86-64
        OS/Version: openSUSE 11.1
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: jpryor at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


It would be nice if 'csharp' could be used to write scripts, so that we could
write executable script files:

    #!/usr/bin/env csharp
    Console.WriteLine ("Hello, world!");

Alas, this fails:

    {interactive}(1,22): error CS1024: Wrong preprocessor directive

So the only way to write a script is to write *two* scripts, the actual script
(above, minus the #!/usr/bin/env line) and a "helper" script:

    #!/bin/sh
    csharp < the-real-script-to-execute

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list