<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'I need to know how can I write it in pascal???' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'I need to know how can I write it in pascal???' posted on the 'Pascal' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Wed, 19 Jun 2013 18:12:56 -0700</pubDate>
    <lastBuildDate>Wed, 19 Jun 2013 18:12:56 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>I need to know how can I write it in pascal???</title>
      <link>http://www.programmersheaven.com/mb/pasprog/409530/409530/i-need-to-know-how-can-i-write-it-in-pascal/</link>
      <description>1) Insert information&lt;br /&gt;
2)search by student number&lt;br /&gt;
3)display all information&lt;br /&gt;
4)delete by student number&lt;br /&gt;
5)Exit&lt;br /&gt;
please enter your choice&lt;br /&gt;
======================================…&lt;br /&gt;
write a program that has the above menu &amp;amp; Contains(max) 100 students with the information(name/students number(code)/field/term)....store them &amp;amp; can do the above performance(in the above menu)&lt;br /&gt;
note: without using 'record'&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/409530/409530/i-need-to-know-how-can-i-write-it-in-pascal/</guid>
      <pubDate>Wed, 18 Nov 2009 11:52:35 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: I need to know how can I write it in pascal???</title>
      <link>http://www.programmersheaven.com/mb/pasprog/409530/409648/re-i-need-to-know-how-can-i-write-it-in-pascal/#409648</link>
      <description>: 1) Insert information&lt;br /&gt;
: 2)search by student number&lt;br /&gt;
: 3)display all information&lt;br /&gt;
: 4)delete by student number&lt;br /&gt;
: 5)Exit&lt;br /&gt;
: please enter your choice&lt;br /&gt;
: ======================================…&lt;br /&gt;
: write a program that has the above menu &amp;amp; Contains(max) 100 students &lt;br /&gt;
: with the information(name/students number(code)/field/term)....store &lt;br /&gt;
: them &amp;amp; can do the above performance(in the above menu)&lt;br /&gt;
: note: without using 'record'&lt;br /&gt;
: &lt;br /&gt;
&lt;br /&gt;
That looks like a homework assignment to me, so no code this time... start writing yourself and ask for help with code examples if you get stuck. Hint: use &lt;strong&gt;array&lt;/strong&gt;s if you cannot use &lt;strong&gt;record&lt;/strong&gt;s.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/409530/409648/re-i-need-to-know-how-can-i-write-it-in-pascal/#409648</guid>
      <pubDate>Fri, 20 Nov 2009 08:49:30 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: I need to know how can I write it in pascal???</title>
      <link>http://www.programmersheaven.com/mb/pasprog/409530/409722/re-i-need-to-know-how-can-i-write-it-in-pascal/#409722</link>
      <description>program StudentManagement;&lt;br /&gt;
{&lt;br /&gt;
Author:&lt;br /&gt;
This program adds, deletes, searches students in an array.&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
uses&lt;br /&gt;
    crt;&lt;br /&gt;
&lt;br /&gt;
var&lt;br /&gt;
    names, fields, terms: array[1..100] of String;&lt;br /&gt;
    codes: array[1..100] of Integer;&lt;br /&gt;
    n: Integer;&lt;br /&gt;
&lt;br /&gt;
procedure display_information(i: Integer);&lt;br /&gt;
begin&lt;br /&gt;
    Writeln(codes[i]);&lt;br /&gt;
    Writeln(names[i]);&lt;br /&gt;
    Writeln(fields[i]);&lt;br /&gt;
    Writeln(terms[i]);&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
procedure SetStudentInfo(nam: String; code: Integer; field: String; term: String; i: Integer);&lt;br /&gt;
begin&lt;br /&gt;
    names[i] := nam;&lt;br /&gt;
    codes[i] := code;&lt;br /&gt;
    fields[i] := field;&lt;br /&gt;
    terms[i] := term;&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
procedure InsertInformation;&lt;br /&gt;
var&lt;br /&gt;
        nam, field, term: String;&lt;br /&gt;
        code: Integer;&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
          {Get details}&lt;br /&gt;
    Write('Enter the name of the student: ');&lt;br /&gt;
    Readln(nam);&lt;br /&gt;
    Writeln;&lt;br /&gt;
&lt;br /&gt;
    Write('Enter the code: ');&lt;br /&gt;
    Readln(code);&lt;br /&gt;
    Writeln;&lt;br /&gt;
&lt;br /&gt;
    Write('Enter the field of the field: ');&lt;br /&gt;
    Readln(field);&lt;br /&gt;
    Writeln;&lt;br /&gt;
&lt;br /&gt;
    Write('Enter the term: ');&lt;br /&gt;
    Readln(term);&lt;br /&gt;
    Writeln;&lt;br /&gt;
&lt;br /&gt;
    {Set info for a new student with these details}&lt;br /&gt;
        SetStudentInfo(nam, code, field, term, n+1);&lt;br /&gt;
&lt;br /&gt;
        n := n + 1; {Increment number of students by 1}&lt;br /&gt;
    Writeln('The student has been added.');&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
procedure SearchStudent;&lt;br /&gt;
var&lt;br /&gt;
    code, i: Integer;&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    Writeln('Enter the code of the student to search: ');&lt;br /&gt;
    Readln(code);&lt;br /&gt;
&lt;br /&gt;
    for i := 1 to n do&lt;br /&gt;
    begin&lt;br /&gt;
        if codes[i] = code then&lt;br /&gt;
        begin&lt;br /&gt;
            Writeln('The student has been found.');&lt;br /&gt;
            Writeln('Details are: ');&lt;br /&gt;
            display_information(i);&lt;br /&gt;
            Exit;&lt;br /&gt;
        end;&lt;br /&gt;
    end;&lt;br /&gt;
&lt;br /&gt;
    Writeln('The student with code ', code, ' is not present.');&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
procedure DeleteStudent;&lt;br /&gt;
var&lt;br /&gt;
    code, i, j: Integer;&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
    Write('Enter the code of the student to delete: ');&lt;br /&gt;
    Readln(code);&lt;br /&gt;
&lt;br /&gt;
    for i := 1 to n do&lt;br /&gt;
    begin&lt;br /&gt;
        if codes[i] = code then&lt;br /&gt;
        begin&lt;br /&gt;
                        {&lt;br /&gt;
                        Student has been found&lt;br /&gt;
            The student at index i has to be deleted.&lt;br /&gt;
            Therefore shift all students from index i to last by one step back&lt;br /&gt;
                        }&lt;br /&gt;
&lt;br /&gt;
                        for j := i+1 to n do&lt;br /&gt;
                        begin&lt;br /&gt;
                names[j-1] := names[j];&lt;br /&gt;
                            codes[j-1] := codes[j];&lt;br /&gt;
                            fields[j-1] := fields[j];&lt;br /&gt;
                            terms[j-1] := terms[j];&lt;br /&gt;
                        end;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
            {Decrement count of students by 1}&lt;br /&gt;
            n := n - 1;&lt;br /&gt;
                        Writeln('The student with code ', code, ' has been deleted.');&lt;br /&gt;
            Exit;&lt;br /&gt;
        end;&lt;br /&gt;
    end;&lt;br /&gt;
&lt;br /&gt;
    Writeln('The student with code ', code, ' is not present.');&lt;br /&gt;
end;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var&lt;br /&gt;
    choice, i: Integer;&lt;br /&gt;
    quit: Boolean;&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
      n := 0; {number of stuents}&lt;br /&gt;
    quit := False;&lt;br /&gt;
&lt;br /&gt;
    while quit = false do&lt;br /&gt;
    begin&lt;br /&gt;
                Writeln('#####################################');&lt;br /&gt;
        Writeln('Select an option from the following:');&lt;br /&gt;
        Writeln('1) Insert information');&lt;br /&gt;
        Writeln('2) Search and display all information by student number');&lt;br /&gt;
        Writeln('3) Delete by student number');&lt;br /&gt;
        Writeln('4)Exit');&lt;br /&gt;
        Writeln('#####################################');&lt;br /&gt;
&lt;br /&gt;
        Readln(choice);&lt;br /&gt;
        Case choice of&lt;br /&gt;
                    1: InsertInformation;&lt;br /&gt;
            2: SearchStudent;&lt;br /&gt;
            3: DeleteStudent;&lt;br /&gt;
            4: quit := True;&lt;br /&gt;
                else&lt;br /&gt;
                    Writeln('You made an invalid choice');&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    end;&lt;br /&gt;
end;&lt;br /&gt;
end.&lt;br /&gt;
&lt;br /&gt;
well you know I've tried to do it....but I cannot run this in Borland Pascal!!!!what should I do???&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/409530/409722/re-i-need-to-know-how-can-i-write-it-in-pascal/#409722</guid>
      <pubDate>Sun, 22 Nov 2009 06:51:40 -0700</pubDate>
      <category>Pascal</category>
    </item>
    <item>
      <title>Re: I need to know how can I write it in pascal???</title>
      <link>http://www.programmersheaven.com/mb/pasprog/409530/409745/re-i-need-to-know-how-can-i-write-it-in-pascal/#409745</link>
      <description>&lt;br /&gt;
You exceeded the maximum allowed data size in BP/TP (variables + constants), it must fit the data segment (65535 bytes), if you run it from FP it should work fine. To make it work under BP change the string variables to a reasonable length like 35 characters: &lt;strong&gt;names, fields, terms: array[1..100] of String&lt;span style="color: Red;"&gt;[35]&lt;/span&gt;;&lt;/strong&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/pasprog/409530/409745/re-i-need-to-know-how-can-i-write-it-in-pascal/#409745</guid>
      <pubDate>Sun, 22 Nov 2009 20:27:07 -0700</pubDate>
      <category>Pascal</category>
    </item>
  </channel>
</rss>