Modify

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#718 closed Feature Request (Rejected)

Call() function claims "function doas not exist" if function was called with wrong number of arguments

Reported by: Hubertus Owned by:
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Call() wrong number of arguments Cc:

Description

In Beta 3.2.13.11 , if a function exists but has wrong number of arguments in Call() function, @error and @extended are set to "0xDEAD and 0xBEEF".
Helpfile says "Sets @error to 0xDEAD and @extended to 0xBEEF if the function does not exist."

My proposal is: If function exsists, but has wrong number of arguments, set @extended to 0xBEE or any other nice hex-word.

Attachments (0)

Change History (3)

comment:1 by TicketCleanup, 17 years ago

Version: Other

Automatic ticket cleanup.

comment:2 by Valik, 17 years ago

Resolution: Rejected
Status: newclosed

No. I'm not going to add a feature that's not needed so it can be immediately abused to solve a problem in the wrong way. All I'm going to do is document that @error and @extended are set on failure to call the function. I am not going to add in a separate @error/@extended value to check a condition that is largely irrelevant.

It is up to the API designer to lay forth the rules about callback functions such as the number of arguments. It is up to the callback designer to ensure their function accepts the correct number of arguments the API will be calling it with. There doesn't need to be functionality in the language to supplant proper communication/documentation.

comment:3 by Valik, 17 years ago

Never mind, JP already documented what I was going to.

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.