Page 1 of 1

switch otb

Posted: 20 Aug 2019, 06:23
by Helgef
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.

Re: switch otb  Topic is solved

Posted: 24 Sep 2019, 02:23
by lexikos
Fixed in v2.0-a105.

Re: switch otb

Posted: 26 Sep 2019, 03:23
by bourdin07
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

Re: switch otb

Posted: 26 Sep 2019, 04:16
by Helgef
It wasn't added to the latest v1 release.

Re: switch otb

Posted: 26 Sep 2019, 17:31
by lexikos
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.