AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

suggestion for function upgrade

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
Jerry



Joined: 24 Jun 2004
Posts: 39

PostPosted: Fri Jun 10, 2005 5:52 pm    Post subject: suggestion for function upgrade Reply with quote

I am writting a function which can have up to 30 parameters passed to it and since I don't know of all the different structures that windows API can create are, I don't know the max amount I should allow for.
Anyway the script looks bulky (check out the subset of it)

Code:
Structure(StructureName
         ,value1 = False
         ,value2 = False
         ,value3 = False
         ,value4 = False
         ,value5 = False
         ,value6 = False
...
         ,value30 = False)
{
...
}


I think it would be a nice feature if there was a way to indicate to the fuction to load up any remaining parameters into an array variable. Eg.

Code:
Structure(StructureName, [value])
{
..
}


Example of the call
Code:
 error := Structure("name" , "one" , "two", "three")


The '[' would indcate an array and in the above example the function would receive the the variables :
StructureName = name
value0 = 3
value1 = one
value2= two
value3 = three


Jerry
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Sat Jun 11, 2005 11:23 am    Post subject: Re: suggestion for function upgrade Reply with quote

Jerry wrote:
I think it would be a nice feature if there was a way to indicate to the fuction to load up any remaining parameters into an array variable.
This is a good suggestion and I'll make sure it's on the to-do list. Thanks for providing example syntax.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group