Unfortunately, yes. It makes code harder to read and VFP made it even worse. Before VFP
MyUdf() would generate an error so you have to call it as
=MyUdf() which clearly shows that it's a function.
>What I didn't realize was that the missing space in 3 is ignored, so it's legal to have a command that looks like a function.
>
>>You shouldn't believe everything you hear. SELECT() function never changes a work area.
>>
>>? SELECT (myWorkArea)
>>SELECT (myWorkArea)
>>SELECT(myWorkArea)
>>
>>
>>>I was just notified of a very strange behavior of the Select command and the Select() function, by Maharastra Kolhapur on Foxite. What he told me, and which I didn't know, was that Select() also performs an implicit Select command "behind the scene" when you supply a work area that is actually used. And even "worse", VFP makes no distinction between Select(myWorkArea) and Select (myWorkArea), note the space, they both are treated as Functions!
>>>
>>>Here is a small, slightly modified, excerpt from my message on Foxite. Please read carefully, the impact may be bigger than you immediately think.
>>>myWorkArea = 'myTable'
>>>1. ?Select(myWorkArea)
>>>2. ?Select (myWorkArea)
>>>3. Select (myWorkArea)
>>>
>>>Note that the only difference between 1 and 2 is the space. I would expect an error on 2.
>>>And that the only difference between 2 and 3 is the question mark.
>>>Since we have the "option 3", maybe it's a good thing that Select() also performs an implicit Select command?
>>>
>>>I am really grateful for your discovery, which I will keep in mind. Luckily we have the debugger.
--sb--