Your Status: Logged out Log in

specify

Member rating: No Rating | Words: | Submitted: Thu Sep 27 2007

On the left is an image preview of every page of this document, and below are the first 150 words with formatting removed:

Program Code Program DVD_Program; Uses Menuunit, CRT, dos; {Declaration of constants in program} CONST Never= False; mem_mainfile= 'c:\ripmid.rec'; vid_mainfile= 'c:\ripvid.rec'; rentalfile= 'c:\ripren.rec'; yesno: array [boolean] of string = ('No', 'Yes'); {Declaration of data type} TYPE mem_rec= record mid: longint: mname: string; address: string; phone: string; end; mem_file= file of mem_rec; video_rec=record vid: longint; vname: string; actor: string; genre: string; cost: real; stock_number: integer; end; video_file= file of video_rec; rental_rec= record mid: longint; vid: longint; datedue: string; dateborrowed: datetime; days: longint; returned: boolean; {--------------------------------------------------------------------} {Declaration of variables} VAR member: mem_file; one_rec: mem_rec; found: Boolean; epos: integer; password: text; video: video_file; two_rec: video_rec; foundb: Boolean; eposb: integer; {--------------------------------------------------------------------} {Ensures that the member names input by users are valid i.e. all characters are letters} Function validatemname (mname: string): integer; VAR j, l: integer; c: char; valid: integer; Begin l:= length (mname); valid:= 0; FOR j:= 1 to 1 DO Begin If not (mname[j] in ['A'..'Z','a'..'z','-',' ']) then valid:= j; End; validatemname:= valid; If (valid<> 0) then Begin textcolor (red); gotoxy (12,19); Write( 'SORRY INVALID NAME '); delay (800); textcolor(blue); gotoxy (37,13); For j:= 1 to 1+1...

Get instant access



  • Instant, unlimited access to our documents in full
  • Swap your work for free access, or pay £4.99
  • To see the full version of this document and 145,982 others
Register Now
OR

Receive email updates for this category



  • Simply tell us your email address and receive a weekly Study Help Email for FREE
  • Receive 3 FREE essay views with each email
  • Get all the latest essays from Coursework.Info & discussion from TheStudentRoom.co.uk