Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do you tell if a property is an array (version 8)
Message
De
15/04/2009 17:17:32
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
15/04/2009 13:04:15
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
Divers
Thread ID:
01393713
Message ID:
01395056
Vues:
94
>>>>All the more reason to have it, IMO. What do you think this means: GOMONTH(DATE() - DAY(DATE()) + 1, 1) - 1
>>>>
>>>>A rose by any other name would smell as sweet, but having to decipher a formula stinks.
>>>>
>>>
>>>It means last day of this month. What is there to decipher it? To decipher you need something like a cipher, no? Maybe I don't see the philosophy here:) IMHO that X2... was something to decipher for a simple task that you could do inline.
>>>Cetin
>>
>>I'm surprised you do not see the problem. GetLastDayOfMonth() needs no deciphering/decoding/thought. If you have never seen the above line, you cannot tell what it does as quickly as GetLastDayOfMonth().
>
>No I don't see the problem. I can easily say at a glance that code is for finding last day of this month while GetLastDayOfMonth() is not as clear and needs deciphering. Does that accept parameter and used for any month or this month?
>
>In case of X2... isn't it the same? You would use such a thing very rarely and probably each time you use you would need to check source to remember what it does. An inline code OTOH would be short, clear, concise (for me).

Thank you for proving my point. I often tell customers programmers would rather run a pair of wires into a cylinder instead of using a spark plug. You are missing the obvious by looking too deeply. There are parameters in the formula and in the UDF. So that is no difference. The formula is like saying "a plant with thorns on the stem with a flower that is red". "red ROSE" is much easier. Any formula takes time to parse / type. Copy and pasting of said formula is wrong too.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform