I was looking at helpfile to learn ahk and it says that this would be uppercase and the next should be lowercase, however I tried it and it was both lowercase, so I dunno if this is my mistake or a mistake in the helpfile?
MyVar = ABC
result := DllCall("CharLower", str, DllCall("CharUpper", Str, MyVar, Str), Str)
MyVar = ABC
result := DllCall("CharLower", ptr, DllCall("CharUpper", Str, MyVar, Ptr), Str)
simple DllCall question
Re: simple DllCall question
Examples:
References:
https://msdn.microsoft.com/en-us/librar ... s.85).aspx
https://msdn.microsoft.com/en-us/librar ... s.85).aspx
HTH
Code: Select all
MyVar = ABC
StringLower, MyVar, MyVar
MsgBox,, StringLower, % MyVar
StringUpper, MyVar, MyVar
MsgBox,, StringUpper, % MyVar
MyVar := Format("{:L}", MyVar)
MsgBox,, Format {:L}, % MyVar
MyVar := Format("{:U}", MyVar)
MsgBox,, Format {:U}, % MyVar
DllCall("CharLower", Ptr, &MyVar)
MsgBox,, DllCall CharLower, % MyVar
DllCall("CharUpper", Ptr, &MyVar)
MsgBox,, DllCall CharUpper, % MyVar
https://msdn.microsoft.com/en-us/librar ... s.85).aspx
https://msdn.microsoft.com/en-us/librar ... s.85).aspx
HTH
Re: simple DllCall question
bigdeal, I believe you misread the help file.
MyVar (the input/output of CharUpper) and result (the return value of CharLower) are not the same thing.But when the same is done with DllCall(), MyVar would be uppercase after the following call because CharLower would have operated on a different/temporary string whose contents were identical to MyVar: