Solved

record input & output

Posted on 2000-04-01
2
153 Views
Last Modified: 2010-05-18
how can i input a record on afile and how can i out put it and how can i make change on it and save it on the file
0
Comment
Question by:khalid_mohammed
2 Comments
 

Accepted Solution

by:
amgedeldirdiri earned 50 total points
ID: 2675962
{You Can Use This Code To Input And Out Put A Record On The File }
Type
   Stud=Record
         No:Integer;
         Name: String[30];
         Subject1:Integer;
         Subject2:Integer;
         Average : Real;
        End;
{Procedure For Input New Data}
Procedure InputRecord;
Var
  Temp:Stud;
  F:File Of Stud;
Begin
   Assign(F,'Stud.Dat');
   ReWrite(F);
   With Temp Do
     Begin
       Readln(NO);
       Readln(Name);
       Readln(Subject1);
       Readln(Subject2);
     End;
    Write(F,Temp);
    Close(F);
End;
{Procedure To Input Change And Save It}
Procedure MakeChaneg;
Var
  Temp;
  F:File Of Stud;
  N:Integer;
Begin
   Assign(F,'Stud.Dat');
   Reset(F);
   Write('Input Your Record No :');
   Readln(N);
   Seek(F,N-1);
   Read(F,Temp);
   With Temp Do
    Begin
      Readln(No);
      Readln(Name);
      Readln(Sybject1);
      Readln(Sybject2);
      Average:=(Subject1+Subject2)/2;
    End;
    Seek(F,N-1);
    Write(F,Temp);
    Close(F);
End;
{This Tow Procedure To Input New That The First One And To Input Change To Save It }
       
0
 

Author Comment

by:khalid_mohammed
ID: 2697296
thank you for your help
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Simple JPEG trim operation with delphi 8 453
A Question about linking objects to ListView Items in Delphi 3 935
Pascal equivalent of VB Select/case 3 339
code issue 8 100
In the hope of saving someone else's sanity... About a year ago we bought a Cisco 1921 router with two ADSL/VDSL EHWIC cards to load balance local network traffic over the two broadband lines we have, but we couldn't get the routing to work consi…
An analysis of the phishing scam that has been affecting Google users, along with steps to take for protection, as well as what to do if you receive one of the emails.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now