diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/conf.py | 10 | ||||
-rw-r--r-- | docs/installing-solidity.rst | 6 | ||||
-rw-r--r-- | docs/miscellaneous.rst | 25 |
3 files changed, 14 insertions, 27 deletions
diff --git a/docs/conf.py b/docs/conf.py index 159cd3ea..ca8c0fec 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -15,6 +15,7 @@ import sys import os +import re # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -56,9 +57,14 @@ copyright = '2016-2017, Ethereum' # built documents. # # The short X.Y version. -version = '0.4.10' +with open('../CMakeLists.txt', 'r') as f: + version = re.search('PROJECT_VERSION "([^"]+)"', f.read()).group(1) # The full version, including alpha/beta/rc tags. -release = '0.4.10-develop' +if os.path.isfile('../prerelease.txt') != True or os.path.getsize('../prerelease.txt') == 0: + release = version +else: + # This is a prerelease version + release = version + '-develop' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/installing-solidity.rst b/docs/installing-solidity.rst index 44a2d45f..42905ede 100644 --- a/docs/installing-solidity.rst +++ b/docs/installing-solidity.rst @@ -83,6 +83,12 @@ If you want to use the cutting edge developer version: sudo apt-get update sudo apt-get install solc +Arch Linux also has packages, albeit limited to the latest development version: + +.. code:: bash + + pacman -S solidity-git + Homebrew is missing pre-built bottles at the time of writing, following a Jenkins to TravisCI migration, but Homebrew should still work just fine as a means to build-from-source. diff --git a/docs/miscellaneous.rst b/docs/miscellaneous.rst index c5a0262f..cc40d6a7 100644 --- a/docs/miscellaneous.rst +++ b/docs/miscellaneous.rst @@ -137,31 +137,6 @@ Different types have different rules for cleaning up invalid values: | | |will be thrown | +---------------+---------------+-------------------+ - -***************** -Esoteric Features -***************** - -There are some types in Solidity's type system that have no counterpart in the syntax. One of these types are the types of functions. But still, using ``var`` it is possible to have local variables of these types:: - - contract FunctionSelector { - function select(bool useB, uint x) returns (uint z) { - var f = a; - if (useB) f = b; - return f(x); - } - - function a(uint x) returns (uint z) { - return x * x; - } - - function b(uint x) returns (uint z) { - return 2 * x; - } - } - -Calling ``select(false, x)`` will compute ``x * x`` and ``select(true, x)`` will compute ``2 * x``. - .. index:: optimizer, common subexpression elimination, constant propagation ************************* |