Rosetta Code

Du brauchst Grafiken, gute Programme oder Leute die dir helfen? Frag hier.
Benutzeravatar
NicTheQuick
Ein Admin
Beiträge: 8677
Registriert: 29.08.2004 20:20
Computerausstattung: Ryzen 7 5800X, 32 GB DDR4-3200
Ubuntu 22.04.3 LTS
GeForce RTX 3080 Ti
Wohnort: Saarbrücken
Kontaktdaten:

Re: Rosetta Code

Beitrag 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
Bild
Antworten