# С Т Р О К О В Ы Е В Е Л И Ч И Н Ы

• Published on
01-Jan-2016

• View
52

0

Embed Size (px)

DESCRIPTION

. Turbo Pascal 7.0. . . . . S1 + s2. 1. 2. . ( ). . L e n g t h ( S ). . - PowerPoint PPT Presentation

Transcript

• Turbo Pascal 7.0

• 1S1 + s2 2

• ( )L e n g t h ( S )

• k:=length();s:= ; n:= length(s);s1=; i:= length(s1);

• k:=length();s= ; n:= length(s);s1=; i:= length(s1);k=3

• k:=length();s= ; n:= length(s);s1=; i:= length(s1);k=3

n=9

• k:=length();s= ; n:= length(s);s1=; i:= length(s1);k=3

n=9

i=0

- !

• C o p y ( S, i, k )

• s:=; s1:=copy (s, 3, 5);s2:=copy (s, 8, 2) + copy (s, 3, 1);

• s:=; s1:=copy (s, 3, 5);s2:=copy (s, 8, 2) + copy (s, 3, 1);

s1=

• s:=; s1:=copy (s, 3, 5);s2:=copy (s, 8, 2) + copy (s, 3, 1);

s1=

s2=

• D e l e t e ( S, i, k )

• s:=;delete (s, 4, 2);s:=; delete (s, 1, 2);delete (s, 6, 4);

• s:=;delete (s, 4, 2);s:=; delete (s, 1, 2);delete (s, 6, 4);

s=

• s:=;delete (s, 4, 2);s:=; delete (s, 1, 2);delete (s, 6, 4);

s=

s=

• 1 2I n s e r t ( s1, s2, i )

• s:=;insert (, s, 4);s1:=; s2:=;insert (s1, s2, 3);

• s:=;insert (, s, 4);s1:=; s2:=;insert (s1, s2, 3);

s=

• s:=;insert (, s, 4);s1:=; s2:=;insert (s1, s2, 3);

s=

s2=

• P o s ( s1, s2 )

• k:=pos(, );s:=;n:=pos(, s);s1:=; s2:=;i:=pos(s1, s2);k:=pos(, );

• k:=pos(, );s:=;n:=pos(, s);s1:=; s2:=;i:=pos(s1, s2);k:=pos(, );

k=3

• k:=pos(, );s:=;n:=pos(, s);s1:=; s2:=;i:=pos(s1, s2);k:=pos(, );

k=3

n=1

• k:=pos(, );s:=;n:=pos(, s);s1:=; s2:=;i:=pos(s1, s2);k:=pos(, );

k=3

n=1

i=2

• k:=pos(, );s:=;n:=pos(, s);s1:=; s2:=;i:=pos(s1, s2);k:=pos(, );

k=3

n=1

i=2k=0