From ef117c29021c31bc7f9c3e0b9797b72538591199 Mon Sep 17 00:00:00 2001 From: Denton Liu Date: Thu, 18 Aug 2016 13:03:41 -0400 Subject: Fix creating contracts section --- docs/control-structures.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/control-structures.rst b/docs/control-structures.rst index 43a1a31e..b3940f72 100644 --- a/docs/control-structures.rst +++ b/docs/control-structures.rst @@ -127,11 +127,11 @@ Those names will still be present on the stack, but they are inaccessible. .. _creating-contracts: -Creating Contracts via new -========================== +Creating Contracts via ``new`` +============================== A contract can create a new contract using the ``new`` keyword. The full -code of the contract to be created has to be known and thus recursive +code of the contract being created has to be known and, thus, recursive creation-dependencies are now possible. :: @@ -142,6 +142,8 @@ creation-dependencies are now possible. x = a; } } + + contract C { D d = new D(4); // will be executed as part of C's constructor -- cgit