# You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0.txt # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # #=========================================================================*/ # load gtm module from gtm import GTM # # Simply test constructor, destructor and connection to GT.M # db = GTM() version = db.version() print "Version = ", version about = db.about() print "About = ", about
# Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # #=========================================================================*/ # load gtm module from gtm import GTM db = GTM() print db.about() print db.version() getValue = "Initially empty" for k in xrange(1, 1000): db.set("^FibonacciA", "1") db.set("^FibonacciB", "1") termnumber = 100 for i in xrange(1, termnumber): db.execute("set ^FibonacciValue=^FibonacciA+^FibonacciB") db.execute("set ^FibonacciB=^FibonacciA") db.execute("set ^FibonacciA=^FibonacciValue") getValue = db.get("^FibonacciValue")
# distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # #=========================================================================*/ # load gtm module from gtm import GTM db = GTM() print db.about() print db.version() getValue = "Initially empty" for k in xrange(1,1000): db.set("^FibonacciA", "1") db.set("^FibonacciB", "1") termnumber = 100 for i in xrange(1,termnumber): db.execute("set ^FibonacciValue=^FibonacciA+^FibonacciB") db.execute("set ^FibonacciB=^FibonacciA") db.execute("set ^FibonacciA=^FibonacciValue") getValue = db.get("^FibonacciValue")