codingstandard.rst 429 Bytes
Newer Older
1
2
3
4
5
6
.. _codingstandard:

==================
Coding Conventions
==================

dulak's avatar
dulak committed
7
8
Python Coding Conventions
=========================
9

Jens Jørgen Mortensen's avatar
Jens Jørgen Mortensen committed
10
11
Follow ASE's :ref:`ase:coding conventions`.

12
13
14
15
16
17
18
19
20
21
22
23
24
25

C-code
======

Code C in the C99 style::

  for (int i = 0; i < 3; i++) {
      double f = 0.5;
      a[i] = 0.0;
      b[i + 1] = f * i;
  }

and try to follow PEP7_.

26
Use **M-x c++-mode** in emacs.
27

dulak's avatar
dulak committed
28
.. _PEP7: http://www.python.org/dev/peps/pep-0007