AutoHotkey Community

It is currently May 26th, 2012, 2:25 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: June 10th, 2005, 5:52 pm 
Offline

Joined: June 24th, 2004, 3:56 am
Posts: 39
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


Report this post
Top
 Profile  
Reply with quote  
PostPosted: June 11th, 2005, 11:23 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
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.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 8 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