| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | |
Hey Any one who can help.
I've got a problem accessing the characters in a string which is part
of an array using pointers. the code is as follows can any one helpme? I want
to put an expression in the read_file procedure to use the generated code to
encrype the strings that are read
Program Encrypt;
Const
lines = 200;
Type
tim = String [80];
Var
file_info: Array [1..200] Of ^tim;
code: Array [33..127] Of Char;
X: Integer;
number: Integer;
file_name: String [8];
a: Text;
letter: Char;
Procedure code_make;
Begin
Randomize;
number := Random (100);
For X := 127 downto 33 Do
Begin
code [X] := Chr (160 - x);
writeln(code[x]);
readln;
End;
End;
Procedure read_file_content;
Begin
Assign (a, 'c:\ezy\doors\gods\tim.tim');
Reset (a);
X := 1;
While Not EoF (a) Do
Begin
New (file_info [X] );
ReadLn (a, file_info [X]^); {I want to use the seperate letter}
X := 1 + X; {here in the code to encrypt the
file}
End;
Close (a);
End;
Procedure rewrite_file;
Begin
Assign (a, 'c:\ezy\doors\gods\tim.qwk');
Rewrite (a);
For X := 1 To 3 Do
Begin
WriteLn (a, file_info [X]^ );
End;
Close (a);
End;
Begin
code_make;
Read_file_content;
rewrite_file;
End.
help would be appreciated
TIM
A happy ColorQWK user!
(UNREGISTERED USER)
* ColorQWK 1.1 [NR] *
--- EzyQwk V1.20g1 01fa002c
* Origin: The Web BBS - RPG Specialists. (02)528-5941 24 Hrs (3:712/523)SEEN-BY: 633/267 270 @PATH: 712/523 506 624 515 711/808 50/99 635/728 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.