Converting FOCAL to language without GOTO: can an "if" statement with multiple GOTO be parsed algorithmically?
I know that I can translate simple GOTO inside a for or while loop by using if/else or break statements. My question is about trying to write a 'translator' function which automatically converts FOCAL ternary IF statements, e.g IF (x-5) 3.1, 4, 6.2 , where those numbers indicate GOTO the designated line numbers elsewhere in the code. Since the target lines may then lead to other IF statements or even back to the original IF statement, can an algorithm successfully "de-spaghettify" the code, or is this one of those software problems that is known to be incomplete? Presumably a chunk of translat
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.