Text := 'this ring is made of 10% pure gold';
Text3 := Text;
WHILE STRPOS(Text3,'%') > 0 DO BEGIN
Text3 := COPYSTR(Text3,STRPOS(Text3,' ') + 1);
i := STRPOS(Text3,'%');
IF (i < 6) AND
(Text2 = '') THEN BEGIN
Text2 := DELCHR(COPYSTR(Text3,1,i),'<>',' ');
j := STRLEN(Text2);
END;
END;
i := STRPOS(Text,'%');
Text1 := COPYSTR(Text,1,i - j) + COPYSTR(Text,i + 2);
MESSAGE('text = %1\Txt1 = %2\Txt2 = %3',Text,Text1,Text2);
Comments
I'm rather new to Navision and I don't know how I can filter a subset (0..9 |%|,) out of a string-variable.
You could code it like this
Albert
=D>