Syntax Difference  
Author Message
Spangltk





PostPosted: Visual FoxPro General, Syntax Difference Top

can some one please tell me the difference between accessing a tables info by using these two different approaches

Table.Field
or
Table->Field


thanks in advance


Visual FoxPro2  
 
 
CetinBasoz





PostPosted: Visual FoxPro General, Syntax Difference Top

They're same.

Table->field

style is less known (maybe only by those who are coming from foxbase days) and not used. It is dereferencing pointer coming from C (old fox was using Watcom C as I remember.)


 
 
Dan Freeman





PostPosted: Visual FoxPro General, Syntax Difference Top

Actually, Cetin, Table->Field comes to us all the way from dBase. The -> actually works pretty much anywhere we're using a . these days:

_screen->Caption = "Hello"

and you can mix an match.

(Useless trivia, I know. :-))