ISaGRAF. Version 3.4

         

DELETE


Àðãóìåíòû:

IN                         MSG              ëþáàÿ íåïóñòàÿ ñòðîêà

NbC                     INT                 êîëè÷åñòâî ñèìâîëîâ, êîòîðûå íóæíî óäàëèòü

Pos                     INT                 ïîçèöèÿ ïåðâîãî ñèìâîëà äëÿ óäàëåíèÿ

                                                  (ïîçèöèÿ ïåðâîãî ñèìâîëà ñòðîêè - 1)

Q                          MSG              èçìåíåííàÿ ñòðîêà

                                                  ïóñòàÿ ñòðîêà åñëè Pos < 1

                                                  ïåðâîíà÷àëüíàÿ ñòðîêà åñëè Pos > äëèíà IN

                                                  ïåðâîíà÷àëüíàÿ ñòðîêà åñëè NbC <= 0

Îïèñàíèå:

Óäàëÿåò ÷àñòü ñòðîêè.

(*FBD ïðèìåð áëîêà “DELETE”*)

(* ST Ýêâèâàëåíò: *)

complete_string := 'ABCD' + 'EFGH'; (* ïîëíàÿ ñòðîêà - ýòî 'ABCDEFGH' *)

sub_string := DELETE (complete_string, 4, 3); (* sub_string is 'ABGH' *)

(* IL Ýêâèâàëåíò: *)

LD                     'ABCD'

ADD                  'EFGH'

ST                     complete_string

DELETE             4,3

ST                     sub_string



Ñîäåðæàíèå  Íàçàä  Âïåðåä