Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MDot / By design
Message
De
06/01/2004 08:22:55
 
 
À
05/01/2004 12:54:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00863704
Message ID:
00864139
Vues:
28
[snip]
>>Your quest is: And NOW forcing back the notation for tables to "->" ?
>>I see no direct need though. The function anylib(), as built now, assumes that the cursor is open. If it has reason to suspect that it could be non-existing, then it should first test: IF USED('mycurs')
>>That would be a better security measure than using ->, IMO.
>Peter, you wished for a subroutine coder to be certain, that only memvars are accessed, and not a field in a table which is open by circumstance. That would entail accessing memvars first, possibly switchable by a set command. ***If*** this future Set command was active, how could you prevent reading from the (not planned for) memvar object if not by using ALLTRIM(myCurs->cMyField) ?

Another reason to be skeptical about SET MDOT indeed.

Do you see similar traps for the other proposals?
- USE (table) LOCAL | PRIVATE | PUBLIC
- HIDE TABLES ALL | EXCEPT (skeleton) | EXCEPT (list) && always only local
- LPARAMETERS( TABLE LocalAlias, VARIABLE LocalVar )

Your anylib() could look like:
FUNCTION anylib( TABLE ttMyCurs )
   ? ALLTRIM( ttMyCurs.cMyField )
   RETURN
or like:
FUNCTION anylib()
   HIDE TABLES EXCEPT MyCurs
   ? ALLTRIM( MyCurs.cMyField )
   RETURN
My own objection against both functions is that they would still have the MDot problem. In the first function there could still be an object variable ttMyCurs.
In the second function only HIDE TABLES ALL would work, but would be useless for anylib() since we're interested in the table's fieldvalue.
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform