Board index » delphi » I am a beginner. Please help

I am a beginner. Please help

Dear Sir/madam,
I am a student, and have got a assignment regarding the PASCAL language.
I will be gratefull to you if you give me a few minutes, and help solve
me these porblems.
I have two questions.
Please solve them for me.....I am a lay man i Pascal.

QUESTION :
a data file document contains the foloowing information.

Document number         integer 6 digits
Document name           string 20 characters
Owner                   string 20 characters
Date created            date field dd-mm-yy
Date last changed       date field dd-mm-yy
size                    integer 3 digits

using PASCAL,give an appropriate record declaration for this data file.

Please help me solve this problem.
though it will take 10 minutes of your but I will be able to gain 10
valuable MARKS

regards
WAQAS PAI
send it to:
wa...@ibm.net
wa...@pai.khi.brain.net.pk

 

Re:I am a beginner. Please help


Quote
Wabash Paid <wa...@ibm.net> wrote:
>Dear Sir/madam,
>I am a student, and have got a assignment regarding the PASCAL language.
>I will be gratefull to you if you give me a few minutes, and help solve
>me these porblems.
>I have two questions.
>Please solve them for me.....I am a lay man i Pascal.

[snip - document structure (aka requirements)]

Quote
>using PASCAL,give an appropriate record declaration for this data file.

>Please help me solve this problem.
>though it will take 10 minutes of your but I will be able to gain 10
>valuable MARKS

It took me less than a minute to convert the snipped portion of
your post to a Pascal record.  

Even if you slept through class, it shouldn't take you long to
read the introductory chapters on variables, type declarations,
and records.  Armed with that knowledge, it would then be a simple
matter for you to complete the assignment yourself.

OTOH, if the last fragment of your post was a typo and you meant
to write, "I am a lazy man", then I suggest you with draw from the
class.  If you won't help yourself, there is little anyone can do
to help.  Even if someone does complete these lessons for you, how
will you complete the next set of lessons?  No matter how you
slice it, you will eventually be on your own.

    ...red

Re:I am a beginner. Please help


Quote
Waqas Pai (wa...@ibm.net) wrote:

: Dear Sir/madam,
: I am a student, and have got a assignment regarding the PASCAL language.
: I will be gratefull to you if you give me a few minutes, and help solve
: me these porblems.
: I have two questions.
: Please solve them for me.....I am a lay man i Pascal.

Oh please.. just ask.. don't D R A G out your question.. see below.

: QUESTION :
: a data file document contains the foloowing information.

: Document number               integer 6 digits
: Document name         string 20 characters
: Owner                 string 20 characters
: Date created          date field dd-mm-yy
: Date last changed     date field dd-mm-yy
: size                  integer 3 digits

: using PASCAL,give an appropriate record declaration for this data file.

okay, I will assume that dd-mm-yy is stored as 8 characters.

type somethingrec = record
                      DocumentNum : array[1..6] of char; {see note below}
                      DocumentNam,
                      Owner       : String[20];
                      Created,
                      LastUpd     : array[1..8] of char;
                      Size        :  array[1..3] of char; {see note below}
                    end;

Note: Now, I've only used Borland Pascal 7, so I don't know if you can
      specify the width of an integer in a record (when you readln or
      writeln an integer, you an use the :<width> but not in a record
      as far as I know).

      I assume that by you saying "6 digit integer", you ment a number
      that was 6 digits (same for the 3 digit one). If I am correct, all
      you would need to do in your program is to convert the array into a
      string, and then into an integer value.

: Please help me solve this problem.
: though it will take 10 minutes of your but I will be able to gain 10
: valuable MARKS

Do you think I could have some of them?

: regards
: WAQAS PAI
: send it to:
: wa...@ibm.net
: wa...@pai.khi.brain.net.pk

Hope this was helpful! (I know that not many people are willing to post
replies to messages like yours - ie. DO MY HOMEWORK FOR ME). As a rule of
thumb, please don't do this. I think it would be better for people in
programming courses to seek out the help of their peers in the class,
rather than over the internet.

Peter Mac Millan

--
======================= When will people realize that in order to get rich
|| Peter Mac Millan  || quick, your scheme must be easy. And it's obvious
|zero....@bitsmart.com| that rich people would want a law against that. =)
============================> http://members.tripod.com/~verbatim <======[VE]

Re:I am a beginner. Please help


Quote
Waqas Pai <wa...@ibm.net> wrote:
>QUESTION :
>a data file document contains the foloowing information.

>Document number             integer 6 digits
>Document name               string 20 characters
>Owner                       string 20 characters
>Date created                date field dd-mm-yy
>Date last changed   date field dd-mm-yy
>size                        integer 3 digits

>using PASCAL,give an appropriate record declaration for this data file.

Some people are so lazy that they have to work hard in order not to do
their work! I mean, it would have been easier to solve this problem then
to compose a message asking for help!

Re:I am a beginner. Please help


Quote
Dr E. Buxbaum wrote:
> Some people are so lazy that they have to work hard in order not to do
> their work! I mean, it would have been easier to solve this problem then
> to compose a message asking for help!

It must be so wonderful to have such an abundance of energy, as you
surely do. Look how much time and energy you put into your response to
this individual. Oh, you are blessed! NOT.

--
Dennis O'Brien        Placentia, CA           dpobr...@southland.net
THE CLEVELAND BROWNS LIVE! http://southland.net/users/dpobrien/browns/
   EXPANSION ONLY EXPANSION ONLY EXPANSION ONLY EXPANSION ONLY

Other Threads