welchen projekt muss ich denn vor dem compilen öffnen?
#include<win32.h>
#include <linux.h>
#include <unix=.h>
#include<kernel32.h>
------------------------------------------------------------------
World(std::string a_msg) : msg(a_msg) {}
std::string greet() const { return msg; }
std::string msg;
------------------------------------------------------------------
dict d;
d["some"] = "thing";
d["lucky_number"] = 13;
list l = d.keys();
------------------------------------------------------------------
public:
virtual int f(std::string x) { return 42; }
virtual ~Base();
------------------------------------------------------------------
def("calls_f", calls_f);
class_<Base, BaseWrap>("Base")
.def("f", &Base::f, &BaseWrap::f_default)
;
------------------------------------------------------------------
#include <boost/python.hpp>
using namespace boost::python;
------------------------------------------------------------------
int w_total;
int l_total;
ulong c_total;
int[char[]] dictionary;
------------------------------------------------------------------
if (c == '\n')
++l_cnt;
if (c >= '0' && c <= '9')
{
}
else if (c >= 'a' && c <= 'z' ||
c >= 'A' && c <= 'Z')
------------------------------------------------------------------
if (!inword)
{
wstart = j;
inword = true;
++w_cnt;
------------------------------------------------------------------
auto f = new BufferedFile(arg);
char[] buf;
while (!f.eof())
{ char c;
------------------------------------------------------------------
buf.length = 1;
buf[0] = c;
inword = 1;
++w_cnt;
------------------------------------------------------------------
writefln("--------------------------------------");
------------------------------------------------------------------
extern (Windows)
{
/* ... function declarations ... */
}
------------------------------------------------------------------
export void func(int foo);
------------------------------------------------------------------
extern (C) void _moduleCtor();
extern (C) void _moduleDtor();
extern (C) void _moduleUnitTests();
------------------------------------------------------------------
LIBRARY "mydll.dll"
EXETYPE NT
SUBSYSTEM WINDOWS
CODE SHARED EXECUTE
DATA WRITE
------------------------------------------------------------------
C:>dmd -ofmydll.dll mydll2.d dll.d mydll.def
C:>implib/system mydll.lib mydll.dll
C:>
------------------------------------------------------------------
C:>dmd test.d mydll.lib
C:>
------------------------------------------------------------------
import std.c.stdio;
import std.c.stdlib;
import std.string;
------------------------------------------------------------------
void _minit();
void _moduleCtor();
void _moduleDtor();
void _moduleUnitTests();
------------------------------------------------------------------
case DLL_THREAD_DETACH:
printf("DLL_THREAD_DETACH\n");
return false;
------------------------------------------------------------------
uint, "x", 2,
int, "y", 3,
uint, "z", 2,
bool, "flag", 1));
------------------------------------------------------------------
mixin(bitfields!(
bool, "flag1", 1,
bool, "flag2", 1,
uint, "", 6));
------------------------------------------------------------------
>>> 3 * 3.75 / 1.5
7.5
>>> 7.0 / 2
3.5
------------------------------------------------------------------
******************************************************************
************************Verzeichnis*******************************
******************************************************************
****** a=1.5+0.5j ******
****** >>> a.real ******
****** 1.5 ******
****** >>> a.imag ******
****** 0.5 ******
******************************************************************
******************************************************************
******************************************************************
------------------------------------------------------------------
python << EOF
class StrawberryIcecream:
def __call__(self):
print 'EAT ME'
------------------------------------------------------------------
b[n:m] = [str1, str2, str3] # sets a number of lines at once
del b[n] # deletes a line
del b[n:m] # deletes a number of lines
------------------------------------------------------------------
# Note the use of single quotes to delimit a string containing
# double quotes
normal('"a2dd"aP')
------------------------------------------------------------------
vim.command("put a")
except vim.error:
# nothing in register a
------------------------------------------------------------------
b = vim.buffers[i] # Indexing (read-only)
b in vim.buffers # Membership test
n = len(vim.buffers) # Number of elements
for b in vim.buffers: # Sequential access
------------------------------------------------------------------
******************************************************************
***************************MAC************************************
******************************************************************
***** w = vim.windows[i] # Indexing (read-only) *****
******************************************************************
******************************************************************
******************************************************************
***** print b.name # write the buffer file name ***** *****
******************************************************************
******************************************************************
------------------------------------------------------------------
[/PHP]