AutoHotkey Community

It is currently May 26th, 2012, 1:11 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: May 27th, 2005, 7:58 am 
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.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 27th, 2005, 1:52 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
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.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group