|
-
June 16th, 2001, 09:29 AM
#1
Proper way of invoking API
Hi!
In some source codes, I have seen API used like this:
SendMessage(rtfText.hwnd, EM_GETMODIFY, 0&, 0&)
What is "&" doing here? I mean if I remove he "&" sign
code still works.
SendMessage(rtfText.hwnd, EM_GETMODIFY, 0, 0)
Is there any difference?
-
June 16th, 2001, 10:03 AM
#2
Re: Proper way of invoking API
The ampersand(&) indicates the datatype of LONG.
a Percent (%) indicates an INteger
a Dollar Sign ($) indicates string
etc. It is a throw back to old DOS programming where you define datatypes by symbol instead of a word.
Some of the old line programmers still use it as well as functions that have been around for eons that still work.
In the case of 0&, it means Zero value. If this were a variable such as myLong& then removing the & would have unpredictable and undesired effects.
John G
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|