AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Small documentation error in DllCall() example

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Fri May 27, 2005 6:58 am    Post subject: Small documentation error in DllCall() example Reply with quote

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

PostPosted: Fri May 27, 2005 12:52 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group