E
E
Eugene Ordinary2017-01-16 22:41:41
Programming
Eugene Ordinary, 2017-01-16 22:41:41

Is it possible to make an array of goto labels?

If there are many cases in switch, isn't it more profitable to make an array with addresses to which control will be transferred? You can make an array of pointers to functions, but they are still functions. Is there something similar for arbitrary code points?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Mercury13, 2017-01-16
@Mercury13

You have no idea, this is how switch usually works.
prog21.dadgum.com/166.html

X
xmoonlight, 2017-01-16
@xmoonlight

stackoverflow.com/questions/256807/check-if-array-...

R
res2001, 2017-01-16
@res2001

Maybe setjmp/longjmp is what you need?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question