AutoHotkey Community

It is currently May 27th, 2012, 5:38 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: March 15th, 2010, 12:48 am 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
What about then?
Code:
x := 01
x := "01"
; or
x := 0xA
x := "0xA"
; or
; ...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 15th, 2010, 9:43 am 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7503
Location: Australia
Btw, SetFormat Integer should be avoided in new scripts. Use IntegerFast.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 15th, 2010, 2:28 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
Sean wrote:
What about then?
Code:
x := 01
x := "01"
; or
x := 0xA
x := "0xA"
; or
; ...

That's not easy, here is what I got so far :)
Requires AHK_N or AHK_H or LowLevel due to getVar().
Code:
var1 := 123    ;Int
var2 := "123" ;Str
var3 := 01
var4 := "01"
var5 := 0xA
var6 := "0xA"

Loop 6
   MsgBox % (Asc(StrGet(getVar(var%A_Index%)+28))=34 ? "String" : "Integer") . "`n" . StrGet(getVar(var%A_Index%)+28)

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 15th, 2010, 4:13 pm 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
You missed my point. I admit I wasn't explicit about it as it's no longer that important to me. Nevertheless, don't you think it's a little too much to have to go down to the lower level and directly exploit the engine's internal struct in order to merely decide whether an user passed 1/01/0xA or "1"/"01"/"0xA"? BTW, that or related was already discussed.
http://www.autohotkey.com/forum/topic52271.html
http://www.autohotkey.com/forum/topic52810.html


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], HotkeyStick, mrhobbeys and 61 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