>>>>I had a strange occurrence with a program I wrote in 2.6 and it's
>>>>memory variable handling in VFP5.
>>>>
>>>>I assigned a memory variable a name that was the same as a field name
>>>>so I could do a SEEK with it. (jobref)
>>>>
>>>>Then assigned it a value with another memory variable jobref=m.ljob
>>>>In 2.6 this worked fine in VFP5 I had to make jobref - m.jobref
>>>>in order for the value to be passed to it from m.ljob.
>>>
>>>It's strange that this code has been working as expected in FP W2.6 It
>>
>>It worked fine in the DOS only VFP5 did it act strange.
>>
>>>didn't in FP 2.x DOS.
>>>Maybe problem is, you were not at the same work area as the table that
>>>contains this field in 2.6.
>>>In all versions (from Foxbase 2.1 to VFP 5 as far as I worked) this
>>>behaviour is same. Field variables takes precedence over mem var.
>>>select tcNames
>>>? FirstName && Field value is displayed
>>>Firstname = "John"
>>>? FirstName && Field value is displayed again
>>>? m.FirstName && "John" is displayed
>>>select 0
>>>? FirstName && "John" is displayed
>>>? m.FirstName && "John" is displayed
>>>? tcNames.FirstName && Field value is displayed
>>>
>>>>I also had a different problem with this exact code and VFP 5
>>>>reported that I needed a valid if then else statement:
>>>>
>>>>STORE 1 to reply
>>>>
>>>>@ 1,1 2 GET reply FUNCTION *H \>>>READ CYCLE
>>>>
>>>>IF reply=1
>>>>
>>>>(program that worked fine before the IF ENDIF)
>>>>
>>>>ENDIF
>>>>
>>>>I don't understand the new behavior. Can someone explain it to me?
>>>
>>>This code should exactly work without any error. I think, code prior to
>>>*if* or inside *if...endif* is erronous (Check syntax, mismatches,
>commas
>>>etc)
>>>Cetin
>>
>>I thougt of the syntax problem for comma but it I commneted the
>>lines out all workd fine.
>>
>>I won't rule out my own error but it does seems strange to have
>>either of these things happen.
>>
>>Open to any more suggestions.
>
>What's the scope of the variable?
>
>Simon
>
>
>
jobref is 5 place character private variable
(not declared as Public)
reply was a number also private (not declared as Public)
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only