Eu estou iniciando neste fabuloso mundo da programação e por isso fiquei com uma dúvida:
como faço para gravar esses dados num arquivo de texto?
pela as vezes que tentei todas diziam que o tipo era incompatível...
eu queria gravar no estilo do programa abaixo mas fiquei em dúvida em uns comandos veja abaixo o que eu já tenho pronto:
----------------------------------------------------------------------------------------------------------------
program Pesquisa;
uses crt;
type reg = record
nome : string[20];
sexo : string[1];
olho : string[10];
cabelo: string[10];
idade : byte;
end;
var
pessoa:array[1..10] of reg;
i,r: integer;
resp,p: string[1];
arquivo : file of text;
teste : reg;
procedure abrir;
begin
assign(arquivo,'registro.txt');
{$I-}
reset(arquivo);
{$I+}
if IOresult <> 0 then rewrite(arquivo);
end;
begin
i:=1;
repeat
abrir;
r:=1;
writeln('');
readln(p);
clrscr;
writeln('Digite o ',i,'o nome:');
readln(pessoa[r].nome);
writeln('Digite o sexo de ',pessoa[r].nome);
writeln('M (masculino) e F (feminino)');
readln(pessoa[r].sexo);
writeln('Digite a cor dos olhos de ',pessoa[r].nome);
readln(pessoa[r].olho);
writeln('Digite a cor dos cabelos de ',pessoa[r].nome);
readln(pessoa[r].cabelo);
writeln('Digite a idade de ',pessoa[r].nome);
readln(pessoa[r].idade);
clrscr;
i:=i+1;
r:=r+1;
write(arquivo,?????); {Estou em dúvida nesta parte}
close(arquivo);
Writeln('Deseja cadastrar mais uma pessoa?(s/n)');
read(resp);
until resp='n';
end.
Ajuda Neste Programa
Started By
charlie.silva
, 27/01/2011, 16:53
4 replies to this topic
#1
Posted 27/01/2011, 16:53
Charlie Honorato da Silva
Auxiliar de informática
charlespunkgrunge@hotmail.com
Auxiliar de informática
charlespunkgrunge@hotmail.com
#2
Posted 12/09/2017, 16:28
Purchasing Zentel In Internet cialis How To Buy Finasteride Riverside
Vendita Cialis Da 5 Mg Priligy Vs Prozac
Discount Generic Isotretinoin Accutane Internet Medication Next Day cheap cialis Viagra 500mg Canada
Vendita Cialis Da 5 Mg Priligy Vs Prozac
Discount Generic Isotretinoin Accutane Internet Medication Next Day cheap cialis Viagra 500mg Canada
#3
Posted 22/09/2017, 02:04
ilbuwtj
http://www.techandpl...online-250.html
http://www.acgproduc...s-gris-315.html
http://www.convergen...thea-black.html
http://www.mastera.e...7-dama-879.html
http://www.gprs-cont...o-2018-071.html
Zapatillas Converse Hombre
New Balance Sneakers 530 Gris
Converse Bajas Blancas
Adidas Js Wings Denim
Adidas X 15.1
http://www.techandpl...online-250.html
http://www.acgproduc...s-gris-315.html
http://www.convergen...thea-black.html
http://www.mastera.e...7-dama-879.html
http://www.gprs-cont...o-2018-071.html
Zapatillas Converse Hombre
New Balance Sneakers 530 Gris
Converse Bajas Blancas
Adidas Js Wings Denim
Adidas X 15.1
#5
Posted 14/10/2017, 01:08
Discounts! beauty products 2017
Products which fall under this return policy can be returned domestically, as long as they are unused and in the original packaging. No questions asked!
If a product that falls under this guarantee is found to be counterfeit, you will get a full refund (shipping costs included).
READ MORE
Hot Selling Cute Women Sexy Lace V-string Briefs Panties Thongs G-string Lingerie Underwear ( 1.12 $)
Hot Dog Adjustable Harness Pets Collar Leopard Campo Professional Out Door Dog Harness Hand Strap for Small Large Dogs Pitbulls ( 6.23 $)
24 fret maple inlay bird electric guitar neck rosewood fingerboard guitar parts musical instruments accessories ( 111.60 $)
15ml white peel off liquid nail art tape latex tape palisade for easy clean base gel ( 1.95 $)
Vernee Thor 4G Smartphone-136.80 $
Canvas tote bags striped women handbags patchwork women shoulder bag new fashion sac a main femme de marque casual bolsos mujer ( 30.14 $)
Luxury bridal shoes peep toe silver small crystals mix big crystals gems high heels wedding shoes sparkling formal dress shoes ( 117.59 $)
Original leagoo m5 quad core shockproof smartphone 2gb ram+16gb rom android os 6.0 mtk6580 3g wcdma fingerprint metal dual sim ( 66.99 $)
Pomogaj posle etogo lyudyam.. (Video)
Fish sunday hot sell camping mountaineer kettle buckle hanging hook backpack tactical survival buckle levert dropship ( 0.17 $)
Apteros Dark Blue Suede Flat Sandal ( 70.00 $)
Inleela 2016 fashion scrub women bucket bag vintage tassel messenger bag large retro shoulder bag simple crossbody bag ( 33.00 $)
Martini light peach and black leather ankle lace flat sandal ( 213.98 $) 3.1 Phillip Lim
GSM-Crypto 301
Casual patchwork and black design crossbody bag for women ( 32.91 $)
Products which fall under this return policy can be returned domestically, as long as they are unused and in the original packaging. No questions asked!
If a product that falls under this guarantee is found to be counterfeit, you will get a full refund (shipping costs included).
READ MORE
Hot Selling Cute Women Sexy Lace V-string Briefs Panties Thongs G-string Lingerie Underwear ( 1.12 $)
Hot Dog Adjustable Harness Pets Collar Leopard Campo Professional Out Door Dog Harness Hand Strap for Small Large Dogs Pitbulls ( 6.23 $)
24 fret maple inlay bird electric guitar neck rosewood fingerboard guitar parts musical instruments accessories ( 111.60 $)
15ml white peel off liquid nail art tape latex tape palisade for easy clean base gel ( 1.95 $)
Vernee Thor 4G Smartphone-136.80 $
Canvas tote bags striped women handbags patchwork women shoulder bag new fashion sac a main femme de marque casual bolsos mujer ( 30.14 $)
Luxury bridal shoes peep toe silver small crystals mix big crystals gems high heels wedding shoes sparkling formal dress shoes ( 117.59 $)
Original leagoo m5 quad core shockproof smartphone 2gb ram+16gb rom android os 6.0 mtk6580 3g wcdma fingerprint metal dual sim ( 66.99 $)
Pomogaj posle etogo lyudyam.. (Video)
Fish sunday hot sell camping mountaineer kettle buckle hanging hook backpack tactical survival buckle levert dropship ( 0.17 $)
Apteros Dark Blue Suede Flat Sandal ( 70.00 $)
Inleela 2016 fashion scrub women bucket bag vintage tassel messenger bag large retro shoulder bag simple crossbody bag ( 33.00 $)
Martini light peach and black leather ankle lace flat sandal ( 213.98 $) 3.1 Phillip Lim
GSM-Crypto 301
Casual patchwork and black design crossbody bag for women ( 32.91 $)
0 user(s) are reading this topic
0 membro(s), 0 visitante(s) e 0 membros anônimo(s)