Pascal

Moderators: None (Apply to moderate this forum)
Number of threads: 4106
Number of posts: 14016

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Need Program Posted by triky3000 on 30 Dec 2006 at 11:17 AM
I need a program wich contained arrays and a little database made with record. for example make a program wich showed the marks of 5 students. Could someone help ? PLEASE...
Report
Re: Need Program Posted by zibadian on 30 Dec 2006 at 12:09 PM
: I need a program wich contained arrays and a little database made with record. for example make a program wich showed the marks of 5 students. Could someone help ? PLEASE...
:
Start by defining your records. Then define your array. Finally write a procedure to fill one record, show one record, show all records, etc.
type
  TStudent = record
    Name: string;
    Mark: integer;
  end;

const
  MaxStudents = 20;

type
  TStudents = array[0..MaxStudents-1] of TStudent;

var
  Students: TStudents;

procedure EditStudent(index: integer);
begin
  { Write code to update indexth student }
end;

procedure ShowStudent(index: integer);
begin
  { Write code to show indexth student's info }
end;

procedure ShowAllStudents;
var
  i: integer;
begin
  for i := 0 to MaxStudents-1 do
    ShowStudent(i);
end;

Report
Re: Need Program Posted by triky3000 on 31 Dec 2006 at 11:20 AM
: : I need a program wich contained arrays and a little database made with record. for example make a program wich showed the marks of 5 students. Could someone help ? PLEASE...
: :
: Start by defining your records. Then define your array. Finally write a procedure to fill one record, show one record, show all records, etc.
:
: type
:   TStudent = record
:     Name: string;
:     Mark: integer;
:   end;
: 
: const
:   MaxStudents = 20;
: 
: type
:   TStudents = array[0..MaxStudents-1] of TStudent;
: 
: var
:   Students: TStudents;
: 
: procedure EditStudent(index: integer);
: begin
:   { Write code to update indexth student }
: end;
: 
: procedure ShowStudent(index: integer);
: begin
:   { Write code to show indexth student's info }
: end;
: 
: procedure ShowAllStudents;
: var
:   i: integer;
: begin
:   for i := 0 to MaxStudents-1 do
:     ShowStudent(i);
: end;
: 

:
dam didn't got the idea of this prog... :/
Report
Re: Need Program Posted by zibadian on 31 Dec 2006 at 11:24 AM
: : : I need a program wich contained arrays and a little database made with record. for example make a program wich showed the marks of 5 students. Could someone help ? PLEASE...
: : :
: : Start by defining your records. Then define your array. Finally write a procedure to fill one record, show one record, show all records, etc.
: :
: : type
: :   TStudent = record
: :     Name: string;
: :     Mark: integer;
: :   end;
: : 
: : const
: :   MaxStudents = 20;
: : 
: : type
: :   TStudents = array[0..MaxStudents-1] of TStudent;
: : 
: : var
: :   Students: TStudents;
: : 
: : procedure EditStudent(index: integer);
: : begin
: :   { Write code to update indexth student }
: : end;
: : 
: : procedure ShowStudent(index: integer);
: : begin
: :   { Write code to show indexth student's info }
: : end;
: : 
: : procedure ShowAllStudents;
: : var
: :   i: integer;
: : begin
: :   for i := 0 to MaxStudents-1 do
: :     ShowStudent(i);
: : end;
: : 

: :
: dam didn't got the idea of this prog... :/
:
This is a start of what you asked for: an array/record-based database of student information. All you need to do now is to fill in the blanks and make it a real program.
Report
Re: Need Program Posted by triky3000 on 31 Dec 2006 at 11:38 AM
: : : : I need a program wich contained arrays and a little database made with record. for example make a program wich showed the marks of 5 students. Could someone help ? PLEASE...
: : : :
: : : Start by defining your records. Then define your array. Finally write a procedure to fill one record, show one record, show all records, etc.
: : :
: : : type
: : :   TStudent = record
: : :     Name: string;
: : :     Mark: integer;
: : :   end;
: : : 
: : : const
: : :   MaxStudents = 20;
: : : 
: : : type
: : :   TStudents = array[0..MaxStudents-1] of TStudent;
: : : 
: : : var
: : :   Students: TStudents;
: : : 
: : : procedure EditStudent(index: integer);
: : : begin
: : :   { Write code to update indexth student }
: : : end;
: : : 
: : : procedure ShowStudent(index: integer);
: : : begin
: : :   { Write code to show indexth student's info }
: : : end;
: : : 
: : : procedure ShowAllStudents;
: : : var
: : :   i: integer;
: : : begin
: : :   for i := 0 to MaxStudents-1 do
: : :     ShowStudent(i);
: : : end;
: : : 

: : :
: : dam didn't got the idea of this prog... :/
: :
: This is a start of what you asked for: an array/record-based database of student information. All you need to do now is to fill in the blanks and make it a real program.
:
:(



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.