Seite 6 von 6

Re: Rosetta Code

Verfasst: 04.01.2014 20:08
von NicTheQuick
Okay, hab die Übersicht gefunden: http://rosettacode.org/wiki/Special:Mos ... Categories
///Edit: Oder besser hier: http://rosettacode.org/wiki/RC_POP.OUT

Aber ich habe noch einen Code gebastelt für Jump anywhere. Vielleicht mag den jemand hinzufügen:

Code: Alles auswählen

Procedure MyFunction(a.i)
	Debug "Start of the procedure."
	
	;Works only within a procedure. You can not jump to 'Inolongerwant:' at the end of the code.
	Goto Inolongerwant
	
	Debug "End of the procedure."
	Inolongerwant:
	ProcedureReturn 42 + a
EndProcedure

MyFunction(a)

;Calls a subroutine and has to return with 'Return'
Gosub SubRoutine

Goto Label1

NowEnd:
	Debug "I don't want to end."
	;If the command Goto is used within the body of a sub routine, FakeReturn must be used.
	FakeReturn
	Goto Inolongerwant:


Label1:
Debug "I'm still there!"
Gosub NowEnd


SubRoutine:
	Debug "Let's calculate something: 4 x 3 = 12"
Return

Inolongerwant:
Debug "-= Game Over =-"
End