rbhkamal Posted May 16, 2006 Share Posted May 16, 2006 (edited) Is it possible to add a micro that will keep the value of the object passed to the switchInstead of doing this:$Value = fucntion() switch $value case 1 msgbox( 0 , '' , '$Value ='& $value) case else if $value > 1 and @error and function() then swtich $value case 2 ;I don't know endswitch endif endswitchWill do this:switch fucntion() case 1 msgbox( 0 , '' , '$Value ='& @MACRO) case else if @MACRO > 1 and @error and function then swtich @MACRO case 2 ;I don't know endswitch endif endswitchAs you can see I didn't even use one variable. This is just to add another cool thing that makes thing easy and writing short scripts easier in addition that reading the script (by the user)will be easier and faster especially for no experienced script writers.thanksTypos Edited May 16, 2006 by rbhkamal "When the power of love overcomes the love of power, the world will know peace"-Jimi Hendrix Link to comment Share on other sites More sharing options...
Valik Posted May 16, 2006 Share Posted May 16, 2006 So you think a new user is going to find it easier to understand that an invisible "variable" gets assigned a value as opposed to explicitly seeing a value assigned? All I see is a savings of one line of code with a small negative impact on readability. Link to comment Share on other sites More sharing options...
rbhkamal Posted May 16, 2006 Author Share Posted May 16, 2006 (edited) So you think a new user is going to find it easier to understand that an invisible "variable" gets assigned a value as opposed to explicitly seeing a value assigned? All I see is a savings of one line of code with a small negative impact on readability.That was extra crap; I should've taken out "especially for no experienced script writers."But anyway I just thought it's good to have some thing like this(If its not hard).Should I expect anything like that to be done? Yes or No Thanks Edited May 16, 2006 by rbhkamal "When the power of love overcomes the love of power, the world will know peace"-Jimi Hendrix Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now