Report a bug
		
				If you spot a problem with this page, click here to create a Bugzilla issue.
		
			Improve this page
		
			Quickly fork, edit online, and submit a pull request for this page.
			Requires a signed-in GitHub account. This works well for small changes.
			If you'd like to make larger changes you may want to consider using
			a local clone.
		
	core.internal.switch_
This module contains compiler support for switch...case statements
License: 
Distributed under the
     Boost Software License 1.0.
   (See accompanying file LICENSE)
Source core/internal/switch_.d
- pure nothrow @nogc @safe int__switch(T, caseLabels...)(scope const T[]condition);
- Support for switch statements switching on strings.Parameters:caseLabels sorted array of strings generated by compiler. Note the strings are sorted by length first, and then lexicographically. T[] conditionstring to look up in table Returns:index of match in caseLabels, a negative integer if not found
- void__switch_error()(stringfile= __FILE__, size_tline= __LINE__);
- Compiler lowers final switch default case to this (which is a runtime error) Old implementation is in core/exception.d
Copyright © 1999-2025 by the D Language Foundation | Page generated by
Ddoc on Mon Mar 31 10:27:34 2025