Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do you tell if a property is an array (version 8)
Message
From
15/04/2009 10:54:50
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
15/04/2009 10:04:40
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01393713
Message ID:
01394979
Views:
59
>Hi again, Mike!
>
>I thought that this thread was done ... but I guess not.
>
>There seems to be some diversity of opinion about whether even your "last day of month" code should be left as is or encapsulated into a sub-routine.

Well, let's see. Mike Feltman (FoxExpress) has such functions. A Google search shows 5400 hits across different languages and databases.

>
>That was essentially my point from before -- there are different perceptions of the degree of complexity needed before one thinks it necessary to use a sub-routine. Some of this has to do with the idioms of the language, I think, and more experienced users have a wider list of idioms that they recognize without having to think about it.
>
>My opinion is that any newbie would love to have that line of code hidden within a well-named PRG.

This non-newbie loves for code to be well-named. Of course there are different perceptions. My point is that adding formulae tends towards more complexity and adding more udfs tends towards less complexity. There is far too much complexity already.

I do admit to not liking the name x2isarray. A module should have a single name and should adapt internally via compiler directives. IsArray would be the best name. This one could take a single parameter and figure out the rest on it's own.

>
>Cheers,
>
>Jim
>
>>>>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().
Previous
Reply
Map
View

Click here to load this message in the networking platform