|
Scala example source code file (Course-2002-08-msil.check)
The Scala Course-2002-08-msil.check source codex = abc count = 111 x = hello count = 112 account deposit 50 -> () account withdraw 20 -> 30 account withdraw 20 -> 10 account withdraw 15 -> x deposit 30 -> () y withdraw 20 -> x deposit 30 -> () x withdraw 20 -> 10 x deposit 30 -> () y withdraw 20 -> 10 2^0 = 1 2^1 = 2 2^2 = 4 2^3 = 8 2^0 = 1 2^1 = 2 2^2 = 4 2^3 = 8 1 2 3 List(1,2,3) out 0 new-value = False *** simulation started *** out 1 new-value = True !0 = 1 *** simulation started *** out 2 new-value = False !1 = 0 out 2 new-value = False *** simulation started *** 0 & 0 = 0 *** simulation started *** 0 & 1 = 0 *** simulation started *** out 11 new-value = True out 11 new-value = False 1 & 0 = 0 *** simulation started *** out 14 new-value = True 1 & 1 = 1 out 14 new-value = False *** simulation started *** 0 | 0 = 0 *** simulation started *** out 24 new-value = True 0 | 1 = 1 *** simulation started *** 1 | 0 = 1 *** simulation started *** 1 | 1 = 1 sum 34 new-value = False carry 34 new-value = False *** simulation started *** 0 + 0 = 0 *** simulation started *** sum 47 new-value = True 0 + 1 = 1 *** simulation started *** carry 50 new-value = True carry 50 new-value = False sum 54 new-value = False sum 54 new-value = True 1 + 0 = 1 *** simulation started *** carry 57 new-value = True sum 61 new-value = False 1 + 1 = 2 sum 61 new-value = False carry 61 new-value = False *** simulation started *** 0 + 0 + 0 = 0 *** simulation started *** sum 82 new-value = True 0 + 0 + 1 = 1 *** simulation started *** sum 89 new-value = False carry 90 new-value = True sum 97 new-value = True carry 98 new-value = False 0 + 1 + 0 = 1 *** simulation started *** sum 113 new-value = False carry 114 new-value = True 0 + 1 + 1 = 2 *** simulation started *** sum 121 new-value = True carry 122 new-value = False sum 129 new-value = False sum 129 new-value = True 1 + 0 + 0 = 1 *** simulation started *** carry 137 new-value = True sum 144 new-value = False 1 + 0 + 1 = 2 *** simulation started *** carry 152 new-value = False sum 152 new-value = True sum 158 new-value = False carry 159 new-value = True 1 + 1 + 0 = 2 *** simulation started *** sum 173 new-value = True 1 + 1 + 1 = 3 in 0 new-value = False ctrl0 0 new-value = False ctrl1 0 new-value = False ctrl2 0 new-value = False out0 0 new-value = False out1 0 new-value = False out2 0 new-value = False out3 0 new-value = False out4 0 new-value = False out5 0 new-value = False out6 0 new-value = False out7 0 new-value = False in 0 new-value = True *** simulation started *** out0 10 new-value = True ctrl0 10 new-value = True *** simulation started *** out1 13 new-value = True out0 14 new-value = False ctrl1 14 new-value = True *** simulation started *** out3 20 new-value = True out1 21 new-value = False ctrl2 21 new-value = True *** simulation started *** out7 30 new-value = True out3 31 new-value = False ctrl0 31 new-value = False *** simulation started *** out7 34 new-value = False out6 35 new-value = True Other Scala examples (source code examples)Here is a short list of links related to this Scala Course-2002-08-msil.check source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.