| | |
| Stránka: 1 z 1
| [ Príspevkov: 7 ] | |
Autor | Správa |
---|
Registrovaný: 14.12.08 Prihlásený: 08.01.09 Príspevky: 13 Témy: 3 |
neviem preco mi vypisuje chybu pri in, mozete mi prosim pomoct
Kód: procedure spoluhlasky (pole:typpole; var vystup:typpole); var i:integer; ret:string; begin for i:=1 to 100 do begin ret:=pole[i]; if not ret[1] in ['a','A','e','E','i','I','o','O','u','U''y','Y'] then vystup:=pole[i]; else vystup:=' ' end; end;
|
|
Registrovaný: 30.04.08 Prihlásený: 15.05.15 Príspevky: 884 Témy: 3 |
Chyba ti tam ciarka.
['a','A','e','E','i','I','o','O','u','U','y','Y']
_________________ Empty your memory, with a free()… like a pointer! If you cast a pointer to an integer, it becomes the integer, if you cast a pointer to a struct, it becomes the struct… The pointer can crash…, and can overflow… Be a pointer my friend… |
|
Registrovaný: 14.12.08 Prihlásený: 08.01.09 Príspevky: 13 Témy: 3 | Napísal autor témy majka090: 08.01.2009 17:19 | |
|
aj tak mi ju tam vypisuje
|
|
Registrovaný: 30.04.08 Prihlásený: 15.05.15 Príspevky: 884 Témy: 3 |
Myslim, ze toto by malo byt uzatvorkovane
Kód: if not (ret[1] in ['a','A','e','E','i','I','o','O','u','U''y','Y']) then ...
(co vsak nie je syntakticke chyba).
Co konkretne ti vypisuje? Ake hlasenie? Je mozne, ze chyba je niekde v zvysku zdrojaku (napr. v type "typpole"). Posli sem zdrojak...
_________________ Empty your memory, with a free()… like a pointer! If you cast a pointer to an integer, it becomes the integer, if you cast a pointer to a struct, it becomes the struct… The pointer can crash…, and can overflow… Be a pointer my friend… |
|
Registrovaný: 14.12.08 Prihlásený: 08.01.09 Príspevky: 13 Témy: 3 | Napísal autor témy majka090: 08.01.2009 17:25 | |
|
ak ju urobim takto, mi nevypise ziadnu chybu, ale vobec mi nic ani nerobi
procedure spoluhlasky (pp:typpole; var vystup:string);
var i:integer;
retazec:string;
begin
vystup:='';
for i:=1 to 100 do
begin
retazec:= pp[i];
if retazec[1] in ['a','e','i','o','u','y','A','E','I','O','U','Y']
then vystup:=' '
else vystup:=pp[i];
end;
end;
neviete co mam na tom zle
|
|
Registrovaný: 30.04.08 Prihlásený: 15.05.15 Príspevky: 884 Témy: 3 |
Mozes to spravit aj jednoduchsie, staci dat len
Kód: for i:=1 to 100 do begin if (pp[i, 1] in ['a','e','i','o','u','y','A','E','I','O','U','Y']) then {vystup} end;
Skus si do toho pola dat len retazce, ktore zacinaju na samohlasku. Potom by ti ich malo vsetky vypisat...
_________________ Empty your memory, with a free()… like a pointer! If you cast a pointer to an integer, it becomes the integer, if you cast a pointer to a struct, it becomes the struct… The pointer can crash…, and can overflow… Be a pointer my friend… |
|
Registrovaný: 14.12.08 Prihlásený: 08.01.09 Príspevky: 13 Témy: 3 | Napísal autor témy majka090: 08.01.2009 17:45 | |
|
uz som na to prisla to else som dala prec a dala tam write
|
|
| Stránka: 1 z 1
| [ Príspevkov: 7 ] | |
Podobné témy | Témy | Odpovede | Zobrazenia | Posledný príspevok |
---|
| Free Pascal a Turbo Pascal v Assembler, C, C++, Pascal, Java | 0 | 384 | 19.12.2014 13:18 Styracoz | | pascal v Assembler, C, C++, Pascal, Java | 19 | 3059 | 30.04.2007 19:54 nikita | | Pascal v Assembler, C, C++, Pascal, Java | 7 | 832 | 14.05.2011 20:04 F3RY | | pascal v Assembler, C, C++, Pascal, Java | 2 | 572 | 24.06.2010 20:17 KatjushaMan | | pascal v Assembler, C, C++, Pascal, Java | 2 | 1105 | 09.03.2007 14:08 misolax | | pascal v Assembler, C, C++, Pascal, Java | 0 | 703 | 03.05.2009 12:35 ebb | | pascal... v Assembler, C, C++, Pascal, Java | 5 | 906 | 18.10.2008 19:02 redog | | Pascal v Assembler, C, C++, Pascal, Java | 4 | 2065 | 01.03.2018 8:02 MTK | | pascal v Assembler, C, C++, Pascal, Java | 11 | 1289 | 07.04.2007 16:50 programator | | Pascal v Assembler, C, C++, Pascal, Java | 7 | 632 | 09.10.2011 21:30 F3RY | | Pascal [ Choď na stránku: 1, 2 ] v Assembler, C, C++, Pascal, Java | 40 | 1472 | 11.12.2016 22:08 viki | | Pascal uloha v Assembler, C, C++, Pascal, Java | 6 | 484 | 03.05.2010 7:42 coldak | | Pascal otazky v Assembler, C, C++, Pascal, Java | 9 | 632 | 17.01.2011 21:18 F3RY | | pascal pomoc v Assembler, C, C++, Pascal, Java | 7 | 689 | 31.08.2009 14:04 juho | | Pascal HELP v Assembler, C, C++, Pascal, Java | 13 | 599 | 07.10.2012 10:58 faraon | | Turbo Pascal v Assembler, C, C++, Pascal, Java | 1 | 4158 | 01.09.2007 18:55 cr3at0r |
| Nemôžete zakladať nové témy v tomto fóre Nemôžete odpovedať na témy v tomto fóre Nemôžete upravovať svoje príspevky v tomto fóre Nemôžete mazať svoje príspevky v tomto fóre
|
|