Solved

record input & output

Posted on 2000-04-01
2
151 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
Comment Utility
{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
Comment Utility
thank you for your help
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

HOW TO: Connect to the VMware vSphere Hypervisor 6.5 (ESXi 6.5) using the vSphere (HTML5 Web) Host Client 6.5, and perform a simple configuration task of adding a new VMFS 6 datastore.
HOW TO: Upload an ISO image to a VMware datastore for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5) using the vSphere Host Client, and checking its MD5 checksum signature is correct.  It's a good idea to compare checksums, because many installat…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

763 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

15 Experts available now in Live!

Get 1:1 Help Now