Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Invalid subscript reference
Message
De
30/08/2007 16:47:50
 
 
À
30/08/2007 15:42:58
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01251239
Message ID:
01251509
Vues:
17
I've run the code (in debug mode) dozens of times trying to replicate the error and nMajor is initialized to 0 and is not updated until you hit this chunk of code.


>But in your code you didn't give how and where it is initialized. May be not local and changed by some other method.
>Cetin
>
>>Hi Cetin
>>
>>nMinor is initialized to 0 at the beginning of this screen and is not referenced again until that line of code.
>>
>>And no, there's no field by that name in the system
>>
>>
>>>>Hello Happy Peoples
>>>>
>>>>We're getting an intermitant error "Invalid subscript reference" and it points to a line of code that really doesn't make a lot of sense to me:
>>>>
>>>>
>>>>(other stuff going on here)
>>>>
>>>>aRecs( 1)	= 0
>>>>select recno(), MasterId from Master ;
>>>>  where ScanCode = m.ScanCode .and. ;
>>>>  batch + sourcecode + status = cSeek .and. ;
>>>>  MasterId <> m.MasterId ;
>>>>into array aRecs
>>>>if aRecs( 1) > 0
>>>>  dimension aMinor( nMinor + alen( aRecs, 1))  <--------- error here
>>>>  for i=1 to alen( aRecs, 1)
>>>>    aMinor( nMinor + i)	= lstr( aRecs( i, 1))
>>>>    delete from MIndex where miSsn = aRecs( i, 2) .and. ;
>>>>      left( miData, 1) $ cMICodes
>>>>  next
>>>>  nMinor	= nMinor + alen( aRecs, 1)
>>>>endif
>>>>
>>>>Coming into this chunk o'code, nMinor = 0, but that shouldn't matter as long as aRecs has at least 1 member, should it?
>>>
>>>Are you sure nMinor is 0 there? You are not using mdot and maybe there is a field named nMinor in current workarea.
>>>Cetin
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform