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?
Printable View
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?
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