<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p style="font-size: 11px ; line-height: normal ; font-family: "menlo"">print(UInt8.min) //0</p><p style="font-size: 11px ; line-height: normal ; font-family: "menlo"">print(UInt8.max) //255</p><p style="font-size: 11px ; line-height: normal ; font-family: "menlo""><br /></p><p style="font-size: 11px ; line-height: normal ; font-family: "menlo"">//Is there an easy way to loop between all values</p><p style="font-size: 11px ; line-height: normal ; font-family: "menlo"">//between (and including both) UInt8.min and UInt8.max?</p><p style="font-size: 11px ; line-height: normal ; font-family: "menlo""><br /></p><p style="font-size: 11px ; line-height: normal ; font-family: "menlo"">//This doesn't work.</p><p style="font-size: 11px ; line-height: normal ; font-family: "menlo"">//Runtime crash because UInt8.max has no successor.</p><p style="font-size: 11px ; line-height: normal ; font-family: "menlo"">for i in UInt8.min...UInt8.max {</p><p style="font-size: 11px ; line-height: normal ; font-family: "menlo""> print(i)</p><p style="font-size: 11px ; line-height: normal ; font-family: "menlo"">}</p><div><br /></div> </body>
</html>