switch otb Topic is solved

Discuss the future of the AutoHotkey language
Helgef
Posts: 4031
Joined: 17 Jul 2016, 01:02
Contact:

switch otb

20 Aug 2019, 06:23

I guess the :arrow: blocks page just wasn't updated and switch (and class definitons / all loops) is meant to support otb.
Example,

Code: Select all

switch{	; error
	case 1:return
}
switch { ; another error
	case 1:return
}
switch 1{ ; still an error
	case 1:return
}

Code: Select all

switch (1){ ; works
	case 1:return
}
Cheers and thanks for the great updates.
lexikos
Posts: 6657
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: switch otb  Topic is solved

24 Sep 2019, 02:23

Fixed in v2.0-a105.
bourdin07
Posts: 15
Joined: 23 Jun 2019, 12:57

Re: switch otb

26 Sep 2019, 03:23

switch, case does not work in AHK v1.30
I tried :

Code: Select all

_test := "ok"
switch (_test) 
{
	case "ok": 
		return
	default:
		return
}
Does not recognize action
Helgef
Posts: 4031
Joined: 17 Jul 2016, 01:02
Contact:

Re: switch otb

26 Sep 2019, 04:16

It wasn't added to the latest v1 release.
lexikos
Posts: 6657
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: switch otb

26 Sep 2019, 17:31

I don't think the script for updating the docs on autohotkey.com is working. The current (er.. future) documentation is here:
http://lexikos.github.io/v1/docs/commands/Switch.htm

Note the version requirement shown at the top of the page.

Return to “AutoHotkey v2 Development”

Who is online

Users browsing this forum: No registered users and 11 guests