ISaGRAF. Version 3.4

         

MID


Àðãóìåíòû:

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

NbC                     INT                 Êîëè÷åñòâî ñèìâîëîâ, êîòîðûå íóæíî èçúÿòü

                                                  íå ìîæåò áûòü áîëüøå äëèíû ñòðîêè IN

Pos                     INT                 ïîçèöèÿ ïîäñòðîêè

                                                  Pos äîëæåí óêàçûâàòü íà ïåðâûé ñèìâîë ïîäñòðîêè

                                                  (ïåðâàÿ ïðàâèëüíàÿ ïîçèöèÿ 1)

Q                                                MSG ñðåäíÿÿ ÷àñòü ñòðîêè IN (åå äëèíà = NbC)

                                                  ïóñòàÿ ñòðîêà åñëè ïàðàìåòðû íåïðàâèëüíûå

Îïèñàíèå:

Áåðåò ÷àñòü ñòðîêè. Êîëè÷åñòâî ñèìâîëîâ è ïîçèöèÿ ïåðâîãî ñèìâîëà çàäàíû.

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

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

sub_string := MID ('abcdefgh', 2, 4);

(* ïîäñòðîêà - 'de' *)

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

LD                     'abcdefgh'

MID                    2,4

ST                     sub_string



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