回复 99楼 bccn201203
8是

梅尚程荀
马谭杨奚
程序代码: Procedure Get_Memory(mem_Style, flag_num)
If gc_Expression == ""
MessageBox("请先输入数据")
Else
If gc_Result == ""
i = 0
gc_temp = gc_Expression
Do while IsDigit(Right(gc_Temp, 1))
i = i + 1
gc_Temp = Left(gc_Temp, Len(gc_Temp) - 1)
EndDo
If i == 0
gc_MemValue = gc_MemValue
Else
a = Right(gc_Expression, i)
gc_temp = &mem_Style + &a * flag_num
gc_MemValue = Transform(gc_temp)
EndIf
Else
If gc_Result != Transform(&gc_Expression)
i = 0
gc_temp = gc_Expression
Do while IsDigit(Right(gc_Temp, 1))
i = i + 1
gc_Temp = Left(gc_Temp, Len(gc_Temp) - 1)
EndDo
If i == 0
gc_MemValue = gc_MemValue
Else
a = Right(gc_Expression, i)
gc_temp = &mem_Style + &a * flag_num
gc_MemValue = Transform(gc_temp)
EndIf
Else
gc_temp = &mem_Style + &gc_Expression * flag_num
gc_MemValue = Transform(gc_temp)
EndIf
EndIf
gc_Memory = "M"
MessageBox("现在存储的数据是:" + gc_MemValue)
EndIf
EndProc
Procedure KeyPress(i, n) &&i为InKey()函数的返回值
Do Case
Case i >= 40 .and. i <= 57 && 数字 小数点 括号 和 运算符
gc_Expression = gc_Expression + chr(i)
Case i == 61 && 计算结果的 '='号
gc_Result = Transform(&gc_Expression)
Case i == 37 && 求一个数的百分之一 此具重复功能
gc_Result = gc_Expression
gc_Result = Transform(&gc_Expression/100)
gc_Expression = gc_Result
Case i = 83 && 要求表达式的平方根请按 shift + s 此具重复功能
gc_Result = gc_Expression
gc_Result = Transform(Sqrt(&gc_Result))
gc_Expression = gc_Result
Case i = 73 && 要求表达式的倒数请按 shift + i 此具重复功能
gc_Result = gc_Expression
gc_Result = Transform(1/&gc_Expression)
gc_Expression = gc_Result
Case i = 127 && 退格
gc_Expression = Left(gc_Expression, Len(gc_Expression) - 1)
Case i = 99 && 清空表达式请按 c 键
gc_Expression = ""
gc_Result = ""
Case i = 67 && 清空表达式最后一个数请按 shift + c 键
Do while IsDigit(Right(gc_Expression, 1))
gc_Expression = Left(gc_Expression, Len(gc_Expression) - 1)
EndDo
Case i = 102 && 要改变数的符号请按 f
If Left(gc_Expression, 1) != '-'
gc_Expression = Padl(gc_Expression, Len(gc_Expression) + 1, "-")
Else
gc_Expression = Right(gc_Expression, Len(gc_Expression) - 1)
EndIf
Case i = 120 && 要以覆盖方式存储请按 alt + 1
ThisForm.Get_Memory("", 1)
Case i = 121 && 要以增加方式存储请按 alt + 2
ThisForm.Get_Memory(gc_MemValue, 1)
Case i = 122 && 要以减少方式存储请按 alt + 3
ThisForm.Get_Memory(gc_MemValue, -1)
Case i = 123 && 要读取存储请按 alt + 4
gc_Expression = gc_Expression + Transform(gc_MemValue)
Case i = 124 && 要清空存储请按 alt + 5
gc_Memory = ""
gc_MemValue = ""
MessageBox("现在存储的数是:" + gc_MemValue)
EndCase
ThisForm.Refresh
EndProc 我也不知道怎么打包 连编了个exe 其他的文件也不大 都压缩发上来算了 