Skip to content

Instantly share code, notes, and snippets.

@harlanhaskins
Created January 7, 2016 23:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harlanhaskins/65c92dae2ed782ea1174 to your computer and use it in GitHub Desktop.
Save harlanhaskins/65c92dae2ed782ea1174 to your computer and use it in GitHub Desktop.
func main() {
var z = 0
func goto(label: String) {
switch label {
case "start":
goto("cond")
case "cond":
if z == 5 {
goto("end")
} else {
goto("body")
}
case "body":
z += 1
goto("cond")
case "end": break
default: break
}
}
goto("start")
print(z)
}
main()
@jay18001
Copy link

jay18001 commented Jan 7, 2016

define goto report_to_your_supervisor_for_a_reeducation_through_labor

@harlanhaskins
Copy link
Author

repl.swift:1:1: error: expected expression
#define goto report_to_your_supervisor_for_a_reeducation_through_labor
^

No preprocessor here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment