马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
<p style="box-sizing: border-box; font-family: "Noto Sans SC", "Microsoft YaHei", ���ź�, -apple-system, BlinkMacSystemFont, "segoe ui", Roboto; padding: 0px; margin-top: 0px; margin-bottom: 0px; color: rgb(0, 0, 40); text-align: justify; font-size: 14px; line-height: 26px;">SCL的赋值运算符确实和LAD的Move有区别,</p><p style="box-sizing: border-box; font-family: "Noto Sans SC", "Microsoft YaHei", ���ź�, -apple-system, BlinkMacSystemFont, "segoe ui", Roboto; padding: 0px; margin-top: 0px; margin-bottom: 0px; color: rgb(0, 0, 40); text-align: justify; font-size: 14px; line-height: 26px;">MOVE更倾向于底层位串的复制,而 := 和算术复制相当,需要考虑数据类型,如果类型不一致,除了隐式转换的情况外需要手工转换数据类型,匹配了才能:=。</p><p style="box-sizing: border-box; font-family: "Noto Sans SC", "Microsoft YaHei", ���ź�, -apple-system, BlinkMacSystemFont, "segoe ui", Roboto; padding: 0px; margin-top: 0px; margin-bottom: 0px; color: rgb(0, 0, 40); text-align: justify; font-size: 14px; line-height: 26px;">:= 是值赋值,位串表示的Dword的数值显然不等于需要的Real值,如果强行:=,则只会把整数简单转换为浮点数,就像21转换为21.0一样。</p><p style="box-sizing: border-box; font-family: "Noto Sans SC", "Microsoft YaHei", ���ź�, -apple-system, BlinkMacSystemFont, "segoe ui", Roboto; padding: 0px; margin-top: 0px; margin-bottom: 0px; color: rgb(0, 0, 40); text-align: justify; font-size: 14px; line-height: 26px;">如果打开IEC检查,MOVE也和:=一样需要类型匹配才能Move。</p><p style="box-sizing: border-box; font-family: "Noto Sans SC", "Microsoft YaHei", ���ź�, -apple-system, BlinkMacSystemFont, "segoe ui", Roboto; padding: 0px; margin-top: 0px; margin-bottom: 0px; color: rgb(0, 0, 40); text-align: justify; font-size: 14px; line-height: 26px;"><br/></p><p><br/></p> |