?
Solved

record input & output

Posted on 2000-04-01
2
Medium Priority
?
159 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Accepted Solution

by:
amgedeldirdiri earned 200 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Learn how to use the free Acronis True Image app to easily transfer data between iPhones and Android phones.
The top devops trends for 2017 are focused on improved deployment frequency, decreased lead time for change and decreased MTTR.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

770 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