Modify

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#2237 closed Bug (No Bug)

SetError/Extended returns 1 if return value is omitted

Reported by: MrCreatoR <mscreator@…> Owned by:
Milestone: Component: AutoIt
Version: 3.3.8.1 Severity: None
Keywords: SetError, SetExtended, Return Cc:

Description

Help file states:

Return Value

By default, none, however, if the optional return value argument is passed, then the function will return that value.

But it's not true, SetError/SetExtended returns 1:

ConsoleWrite(Test() & @LF)

Func Test()
	Return SetError(1)
EndFunc

Attachments (0)

Change History (3)

comment:1 by Valik, 14 years ago

Resolution: No Bug
Status: newclosed

I don't think you understand what "none" means. It DOES NOT mean 0, otherwise it would have stated as much.

in reply to:  1 comment:2 by MrCreatoR <mscreator@…>, 14 years ago

Replying to Valik:

It DOES NOT mean 0

But it also does not mean 1, right? :)

comment:3 by Valik, 14 years ago

It means don't fucking use the return value because it's not defined.

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.