diff --git a/src/OpenFOAM/db/dictionary/functionEntries/calcEntry/calcEntry.C b/src/OpenFOAM/db/dictionary/functionEntries/calcEntry/calcEntry.C
index 7bb6c1c14a3dcddd7efde9b68f54958c6decfa05..bc5a1e65eaac532fa8cdc300b9612609cab62dcb 100644
--- a/src/OpenFOAM/db/dictionary/functionEntries/calcEntry/calcEntry.C
+++ b/src/OpenFOAM/db/dictionary/functionEntries/calcEntry/calcEntry.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -37,6 +37,14 @@ namespace functionEntries
 {
     defineTypeNameAndDebug(calcEntry, 0);
 
+    addToMemberFunctionSelectionTable
+    (
+        functionEntry,
+        calcEntry,
+        execute,
+        dictionaryIstream
+    );
+
     addToMemberFunctionSelectionTable
     (
         functionEntry,
@@ -96,4 +104,48 @@ bool Foam::functionEntries::calcEntry::execute
 }
 
 
+bool Foam::functionEntries::calcEntry::execute
+(
+    dictionary& parentDict,
+    Istream& is
+)
+{
+    Info<< "Using #calcEntry at line " << is.lineNumber()
+        << " in file " <<  parentDict.name() << endl;
+
+    dynamicCode::checkSecurity
+    (
+        "functionEntries::calcEntry::execute(..)",
+        parentDict
+    );
+
+    // Read string
+    string s(is);
+    // Make sure we stop this entry
+    //is.putBack(token(token::END_STATEMENT, is.lineNumber()));
+
+    // Construct codeDict for codeStream
+    // must reference parent for stringOps::expand to work nicely.
+    dictionary codeSubDict;
+    codeSubDict.add("code", "os << (" + s + ");");
+    dictionary codeDict(parentDict, codeSubDict);
+
+    codeStream::streamingFunctionType function = codeStream::getFunction
+    (
+        parentDict,
+        codeDict
+    );
+
+    // use function to write stream
+    OStringStream os(is.format());
+    (*function)(os, parentDict);
+
+    // get the entry from this stream
+    IStringStream resultStream(os.str());
+    parentDict.read(resultStream);
+
+    return true;
+}
+
+
 // ************************************************************************* //
diff --git a/src/OpenFOAM/db/dictionary/functionEntries/calcEntry/calcEntry.H b/src/OpenFOAM/db/dictionary/functionEntries/calcEntry/calcEntry.H
index 9e26072c5f26d12b4cab71f4848d6f20fafc4999..e1083db42a48683f629c25e1fd9b96761404ed33 100644
--- a/src/OpenFOAM/db/dictionary/functionEntries/calcEntry/calcEntry.H
+++ b/src/OpenFOAM/db/dictionary/functionEntries/calcEntry/calcEntry.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2013 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -89,6 +89,9 @@ public:
     // Member Functions
 
         //- Execute the functionEntry in a sub-dict context
+        static bool execute(dictionary& parentDict, Istream&);
+
+        //- Execute the functionEntry in a primitiveEntry context
         static bool execute
         (
             const dictionary& parentDict,