Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Memory Variables
Message
De
05/12/1997 10:48:37
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
05/12/1997 10:18:32
Andy Roth
Neyenesch Printers
Californie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00064026
Message ID:
00064034
Vues:
32
>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 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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform