Sign in to follow this  
Followers 0
BitByteBit

Proper macro usage

1 post in this topic

#1 ·  Posted (edited)

When using a macro within a loop, is it "better" to assign a variable's value to the macros's value?

In essence my question is, is a macro a variable or a function.

Found my answer in the help file.

"Macros that are special read-only variables"

:huh2:.

Can someone delete this thread?

Global $aArray[4][2]
For $i = 0 to 3
   If $aArray[$i][0] = @GUI_CtrlId Then Return $aArray[$i][1]
Next

Or

Global $aArray[4][2]
$hCtrl = @GUI_CtrlId 
For $i = 0 to 3
   If $aArray[$i][0] = $hCtrl Then Return $aArray[$i][1]
Next
;An exercise in futility?
Edited by BitByteBit

Share this post


Link to post
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
Sign in to follow this  
Followers 0