Modify

Opened 12 years ago

Closed 12 years ago

Last modified 12 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 follow-up: Changed 12 years ago by Valik

  • Resolution set to No Bug
  • Status changed from new to closed

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

comment:2 in reply to: ↑ 1 Changed 12 years ago by MrCreatoR <mscreator@…>

Replying to Valik:

It DOES NOT mean 0

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

comment:3 Changed 12 years ago by Valik

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

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.