win10计算器-有限状态机
2021-02-02 21:54:59 4 举报
个人整理的仿win10自带计算器在微信小程序demo实现流程图。让头脑清晰、方便书写代码、降低错误提高开发效率(github地址:https://github.com/MaricoCheung/wx-calculator)
作者其他创作
大纲/内容
STATUS 3/operand1: value1operand2: nullopertor: +||-||*||/result: nullscreenNum: +=btn
STATUS 4/operand1: value1operand2: screenNumopertor: +||-||*||/result: calculate()screenNum: +=result
press =
press 0~9
press +-*/
press +-*/STATUS MACHINE FINISHED
press 1~9
press 0+-*/=STATUS MACHINE NULL
STATUS 2/operand1: screenNumoperand2: nullopertor: +||-||*||/result: nullscreenNum: value
INIT STATUS/operand1: nulloperand2: nullopertor: ''result: nullscreenNum: 0
STATUS 1/operand1: nulloperand2: nullopertor: ''result: nullscreenNum: += btn
0 条评论
回复 删除
下一页