 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Fri May 27, 2005 6:58 am Post subject: Small documentation error in DllCall() example |
|
|
On the DllCall() function help page I noticed a small syntax error in one of the examples. It reads:
| Quote: | ; Example: Call the API's wsprintf() to pad the number 432 with leading zeros to make it 10 characters wide.
VarSetCapacity(ZeroPaddedNumber, 20) ; Ensure the variable is large enough to accept the new string.
DllCall("wsprintf", "str", ZeroPaddedNumber, "str", "%010d", int, 432, "Cdecl") ; Requires the Cdecl calling convention.
MsgBox %ZeroPaddedNumber%
|
The DllCall line is missing the quotes around int. I believe that line should read:
| Quote: | DllCall("wsprintf", "str", ZeroPaddedNumber, "str", "%010d", "int", 432, "Cdecl") ; Requires the Cdecl calling convention.
|
|
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Fri May 27, 2005 12:52 pm Post subject: |
|
|
| Thanks. Although newer versions allow the quotes to be omitted, I didn't intend for them to be missing in that example, so I fixed it. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|