home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!haven.umd.edu!mimsy!nocusuhs!nmrdc1!frmug!lill!vanney.raphael
- From: vanney.raphael@lill.frmug.fr.mugnet.org (Vanney Raphael)
- Newsgroups: comp.lang.pascal
- Subject: BRAINS REQUIRED HERE PLEA
- Message-ID: <1027.6.uupcb@lill.frmug.fr.mugnet.org>
- Date: 23 Dec 92 21:43:00 GMT
- Reply-To: vanney.raphael@lill.frmug.fr.mugnet.org (Vanney Raphael)
- Organization: Li'LL BBS - Paris, France
- Lines: 33
-
- Hello !
-
- MC>Okay all you intelligent, wonderful, experts out there....,
-
- Hey, did we happen to meet before ?
-
- MC>why is it that
- MC>when I add more than one record in this procedure, the value of Index
- := 0
- MC>and then another procedure states, out of Range.....error when I try
- MC>to access it.
-
- Make sure the GLOBAL version of your Index variable is initialized...
-
- MC>procedure add_a_record(Movies : Collection; Index : Integer);
-
- Looks like your "Index" parameter is passed by value, not by address ;
- hence,
- any modification made down here do not affect the global variable, but
- only
- the copy created by the compiler for the procedure's use.
- Try changing to :
-
- MC>Procedure Add_a_Record(Movies : Collection; Var Index : Integer) ;
-
- Merry Christmas,
-
- Alp, Raphael.
-
- * OLX 2.1 TD * On dirait que mon olmr fonctionne, non ?
- --- FMail 0.92
- * Origin: ICEBERG - La Garenne * FRANCE * Tel:(33)-1-47699261 (2:320/1)
-
-