Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trivial question re return value and ()
Message
From
19/05/2016 10:33:37
 
 
To
19/05/2016 08:10:20
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8.1
Network:
Windows Server 2012
Database:
Visual FoxPro
Application:
Desktop
Virtual environment:
VMWare
Miscellaneous
Thread ID:
01636581
Message ID:
01636623
Views:
64
>As Mike said, the only time parentheses change what happens is when VFP expects a name. Then, the contents of the parentheses are treated as a name:

isolating/forcing a parameter out of passing by reference into value when calling as a procedure
uoh = 2
Do AreYouCertain with (m.uoh)
? m.uoh 

vs.

Do AreYouCertain with m.uoh
? m.uoh 

function AreYouCertain  tnuoh
tnuoh = m.tnuoh * m.tnuoh
? m.tnuoh 
return
;-))
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform