Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mdot question
Message
De
05/04/2021 18:41:53
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
05/04/2021 16:46:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01679493
Message ID:
01679542
Vues:
43
>Hi Mike,
>>The array is not a memvar at all. It's more of a structure.
>
>Depends a lot on your POV. If you visualize it as a Locator in a C-Fll, the difference is a memvar has 0 in l_subs, whereas arrays have 1 or 2 (plus the offset values).
>...
>>Don't let them spend time figuring things out. Tell them.
>
>Putting MDot on left side of an "=" assignment already told the compiler it has to target a Memvar (including arrays an objects). MDotting that or the targets of "Store" is redundant.
    LOCAL yy
    FOR yy = 1 TO ALEN(taParms,1)
      LOCAL (taParms[m.yy,1])                      &&& declare the variable in taParms[yy,1]
      STORE (taParms[m.yy,2]) TO (taParms[m.yy,1])   &&& store the variable whose name is in taParms[yy,1] with the value in taParms[yy,2]
    ENDFOR
>No problem with citing personal preference or grokking speed - but it is redundant.

Agreed. It is more complexity to remember where to put it and where not, so I opt to just use it. But I agree, it's redundant.

>
>>
>>Many people write this:
>>select alias
>>replace alias.fieldname with value.
>
>Those people need to be introduced to "in alias" and the eof() trap of their coding style ;-)
>
>regards
>thomas
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform