Thread Tools
Old January 13, 2000, 07:32   #1
boz
 
Local Time: 23:28
Local Date: October 30, 2010
Join Date: Jan 2000
Location: manchester,england
Posts: 3
heres a new prog, with better stuff than the last i gave you-nimrod
program displaymag;
uses crt;
var magnam :string;
exit :boolean;
option :integer;
name :array[1..20] of string;
price :array[1..20] of real;
mag :text;
key :char;
pointer :integer;
nomags :integer;

procedure readfile;
begin
assign(mag,'mfile.dat');
reset(mag);
pointer:=1;
readln(mag,name[pointer]);
while not eof(mag) do
begin
readln(mag,price[pointer]);
pointer:=pointer+1;
readln(mag,name[pointer]);
end;
nomags:=pointer-1;
end;

procedure display;
begin
writeln('Please enter the name of the magazine');
readln(magnam);
for pointer:=1 to nomags do
begin
if name[pointer]=magnam then
begin
writeln(name[pointer],' costs ',price[pointer]:6:2);
key:=readkey;
end;
end;
end;

procedure displayall;
begin
clrscr;
pointer:=1;
for pointer:=1 to nomags do
begin
writeln('name ',name[pointer],' price ',price[pointer]:6:2);
end;
key:=readkey;
end;

procedure menu;
begin
writeln('`1` Display All Magazines');
writeln('`2` Display Selected Magazine');
writeln('`3` Exit');
readln(option);
case option of
1: begin
displayall;
end;

2: begin
display;
end;

3: begin
exit:=true;
end;
end;
clrscr;
end;

{main program}
begin
clrscr;
readfile;
repeat
menu;
until exit;
end.
boz is offline  
Old January 13, 2000, 08:16   #2
Scouse Gits
lifer
Civilization II PBEMTrade Wars / BlackNova TradersGalCiv Apolyton EmpireApolytoners Hall of FameCivilization II Succession Games
Emperor
 
Scouse Gits's Avatar
 
Local Time: 23:28
Local Date: October 30, 2010
Join Date: Nov 1999
Location: Liverpool, United Kingdom
Posts: 6,344
Can I suggest you return to Sketching ?

------------------
____________
Scouse Git[1]

"CARTAGO DELENDA EST" - Cato the Censor
Scouse Gits is offline  
Old January 13, 2000, 10:51   #3
Bohlen
Prince
 
Bohlen's Avatar
 
Local Time: 18:28
Local Date: October 30, 2010
Join Date: Nov 1999
Location: of Space
Posts: 342
What the hell are you talking about?
Bohlen is offline  
Old January 13, 2000, 11:39   #4
Scouse Gits
lifer
Civilization II PBEMTrade Wars / BlackNova TradersGalCiv Apolyton EmpireApolytoners Hall of FameCivilization II Succession Games
Emperor
 
Scouse Gits's Avatar
 
Local Time: 23:28
Local Date: October 30, 2010
Join Date: Nov 1999
Location: Liverpool, United Kingdom
Posts: 6,344
On the assumption that a Systems Analyst can read Borland Pascal, it appears you mean me.

The thread author is "Boz", Dickens wrote a book entitled "Sketches by Boz" hence my suggestion that sketching would perhaps be more suited to a CIV forum than a magazine price look-up table. Although I must admit it would not be much more suited...

------------------
____________
Scouse Git[1]

"CARTAGO DELENDA EST" - Cato the Censor
Scouse Gits is offline  
Old January 13, 2000, 11:49   #5
Bohlen
Prince
 
Bohlen's Avatar
 
Local Time: 18:28
Local Date: October 30, 2010
Join Date: Nov 1999
Location: of Space
Posts: 342
SG - An analyst, not a programmer. I was referring to the glop of stuff at the top of the page. I would never insult a Scouse Git. There are too many of you!
Bohlen is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 19:28.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team