ARWRITE
Àðãóìåíòû:
ID INT èäåíòèôèêàòîð ìàññèâà (äîëæåí áûòü â ïðåäåëàõ [0..15])
Pos INT ïîçèöèÿ ýëåìåíòà â ìàññèâå
(äîëæíà áûòü â ïðåäåëàõ [0..size-1])
IN INT íîâîå çíà÷åíèå ýëåìåíòà
ok INT ðåçóëüòàò èñïîëíåíèÿ
1 = çàïèñü áûëà óñïåøíî âûïîëíåíà
2 = íåïðàâèëüíûé èäåíòèôèêàòîð ìàññèâà
3 = íåïðàâèëüíûé èíäåêñ
Îïèñàíèå:
Çàïîìèíàåò (çàïèñûâàåò) çíà÷åíèå â ìàññèâ öåëûõ.
(*FBD ïðîãðàììà, èñïîëüçóþùàÿ áëîê óïðàâëåíèÿ ìàññèâîì*)
(* ST Ýêâèâàëåíò: *)
If (array_error) Then Return; End_if;
write_status := ARWRITE (Ident, Index, value);
(* array_error ïðèõîäèò îò ARCREATE *)
(* IL Ýêâèâàëåíò: *)
LD array_error
RETC
LD ident
ARWRITE index,value
ST write_status