- 1、本文档共32页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
vb6计算器代码(国外英文资料)
vb6计算器代码(国外英文资料)
VB6 calculator
This is a work that I did when I was a young man, in order to deal with the very long Numbers, the 8-byte unsigned,
But we dont have that type of VB, the longest double can only handle 8 bytes of the number of characters, or the precision.
At that time, also dont understand, cant, just made up the calculator, operations with string parameters, low operation efficiency that is, of course, at the expense of speed for function of bai, plant.
Now, in fact, VB has a Variant type that can be super long, and you can try it.
Dim Num As the Variant
Dim highl As the Variant
Dim lowl As the Variant
Num = CDec CDec (highl) * (2 ^ 32) + CDec (lowl)
GetInt8Str = CStr (Num)
ClsStringMath:
Option Explicit
List of functions:
character addition (jw = carry)
Public Function CharAdd (s1 As String, s2 As String, jw As Boolean) As String
example:? CharAdd ( 9 , 5, True)
15
string addition
Public Function StringAdd (s1 As String, s2 As String) As String
example:? StringAdd ( 9999999 , 2)
subtract = minus sign
Public Function CharSubtraction (s1 As String, s2 As String, ByRef minus As Boolean) As String
example:? StringAdd ( 2 , 3)
1, minus = true
string subtraction (minus = minus)
Public Function StringSubtraction (ss1 As String, ss2 As String, minus As Boolean) As String
example:? StringAdd ( 1234 , 23423)
22189, minus = true
character multiplication (jw = carry)
Public Function CharMultiple (s1 As String, s2 As String, jw As String) As String
example:? CharMultiple ( 9 , 9, 5)
86,
string multiplication
Public Function StringMultiple (s1 As String, s2 As String) As String
example:? StringMultiple ( 156 , 78)
12168,
character division
Public Function CharDevide (s1 As String, s2 As String, ByRef ys As String) As String
example:? CharDevide ( 19 , 3, ys)
6, ys = 1
string division
Public Function StringDevide (s1 As String, s2 As String, ByRef ys As String) As String
example:? StringDevide ( 156 , 75, ys)
2, ys = 6
the relative size, s1
文档评论(0)