Jump to content

Very Simple Question on Variable Assignment


Recommended Posts

I m a newbie and have a question on assigning a value to a string in autoit 3.2.4.9.

What is the difference in the following -

$Final_num = 0x40000000

MsgBox(0, "Varible", $Final_num)

and

$Final_num = "0x40000000"

MsgBox(0, "Varible", $Final_num)

The first result is 1073741824, and the second is 0x40000000

TIA

Frank Long

Link to comment
Share on other sites

The first one is a NUMBER, the second one is a STRING.

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

Thanks for the reply. I understand it is a numerical assignment, and I just figured out it is printing out the dec value.

F. Long

FWISW: Help file > Index tab > Variable

Scan that until you get to this:

"Each variable is stored as a variant."

Click on and read about "variant". In particular, this line:

"A variant can contain numeric or string data and decides how to use the data depending on the situation it is being used in."

Then there is some more stuff on Numbers/Strings/Booleans...

This is just FYI - I think you figured out your answer.

Welcome to the forum. Hang around, it is a great community.

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...