alarm_get


描述

This function can be used to get the current value of the given alarm. You supply the alarm number from 0 to 11 and this function will return the value that the alarm is currently on. This is an alternative method to getting the alarm array value directly.


语法:

alarm_get(index);

参数 描述
index The alarm index to get, from 0 to 11.


返回:

Real(实数)


例如:

for (var i = 0; i < 12; i++)
   {
   if alarm_get(i) > 0 alarm_set(i, -1);
   }

The above code checks all the alarms in the calling instance and if they are greater than 0 it sets them to -1, stopping them from counting down any further.