Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PROCEDURE SepararPalabras(VAR listaPalabras : TLista; fraseIntroducida : TElemento);
- VAR
- i, j, l : integer;
- k : char;
- strAux : TElemento;
- BEGIN
- i := 1; {Inicio de palabra}
- j := 0; {Largo de palabra}
- l := ord(fraseIntroducida[0]);
- REPEAT
- WHILE ((fraseIntroducida[i + j] <> ' ') AND ((i + j) <= l)) DO BEGIN
- j := j + 1;
- END;
- Construir(listaPalabras, copy(fraseIntroducida, i, j));
- i := i + j + 1;
- j := 0;
- UNTIL (i >= l);
- END;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement