Solved

record input & output

Posted on 2000-04-01
2
156 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 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

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

Enabling the Skype for Business Meeting Scheduler in Hybrid OWA
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

756 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