行业新闻

MCGS问题:如何按条件对变量进行存盘?

问题:
<div class="questions-ask-main" style="border: none; margin: 0px; padding: 0px; border-collapse: collapse; background-image: url(" .="" ..="" img="" arr6.gif?_version="1.0.6&quot;);" background-position:="" right="" center;="" background-size:="" initial;="" background-repeat:="" no-repeat;="" background-attachment:="" background-origin:="" background-clip:="" width:="" 620px;="" float:="" left;"="">如何按条件对变量进行存盘?
回答:
1)设置变量有存盘属性,即在实时数据库中定义该数据时,要在它的存盘属性页中设置为“定时存盘,存盘周期为0秒”。
2)使用!savedata()函数令变量存盘。可以对这个函数的执行设置一定的条件,这样就实现了按条件对变量存盘。