瀏覽代碼

Added return at the end of every function

Yentl Van Tendeloo 8 年之前
父節點
當前提交
b100495f05

二進制
bootstrap/bootstrap.m.gz


+ 2 - 0
bootstrap/user_interface.alc

@@ -23,3 +23,5 @@ Void function new_user():
 			return!
 		else:
 			log("Unsupported interface!")
+
+	return!

+ 2 - 0
bootstrap/user_manager.alc

@@ -33,3 +33,5 @@ Void function user_management():
 
 				//Add this only at the end, as otherwise the user will already be detected
 				dict_add(read_root(), username, user_root)
+	
+	return!

+ 2 - 0
integration/code/binary_to_decimal.alc

@@ -21,3 +21,5 @@ Integer function b2d(param : String):
 Void function main():
 	while(True):
 		output(b2d(input()))
+
+	return!

+ 2 - 0
integration/code/cbd_semantics.alc

@@ -659,3 +659,5 @@ Void function main():
 
 	while (True):
 		execute_cbd(instantiate_model(import_node("models/CausalBlockDiagrams_Design")))
+
+	return!

+ 2 - 0
integration/code/factorial.alc

@@ -9,3 +9,5 @@ Integer function factorial(n : Integer):
 Void function main():
 	while(True):
 		output(factorial(input()))
+
+	return!

+ 2 - 0
integration/code/fibonacci.alc

@@ -9,3 +9,5 @@ Integer function fib(param : Integer):
 Void function main():
 	while(True):
 		output(fib(input()))
+
+	return!

+ 2 - 0
integration/code/fibonacci_smart.alc

@@ -15,3 +15,5 @@ Void function main():
 	list_append(numbers, 1)
 	while(True):
 		output(fib(input()))
+
+	return!

+ 2 - 0
integration/code/fsa_semantics.alc

@@ -252,3 +252,5 @@ Void function main():
 
 	while (True):
 		execute_fsa(instantiate_model(import_node("models/FiniteStateAutomata_Design")))
+
+	return!

+ 2 - 0
integration/code/if_elif.alc

@@ -10,3 +10,5 @@ Integer function compare_with_zero(n : Integer):
 Void function main():
 	while(True):
 		output(compare_with_zero(input()))
+
+	return!

+ 2 - 0
integration/code/if_elif_else.alc

@@ -11,3 +11,5 @@ Integer function compare_with_zero(n : Integer):
 Void function main():
 	while(True):
 		output(compare_with_zero(input()))
+
+	return!

+ 2 - 0
integration/code/leap_year.alc

@@ -14,3 +14,5 @@ Boolean function leap_year(year : Integer):
 Void function main():
 	while (True):
 		output(leap_year(input()))
+
+	return!

+ 2 - 0
integration/code/mini_modify.alc

@@ -250,3 +250,5 @@ Element function modify(model : Element):
 		else:
 			output("Unknown command: " + cast_v2s(cmd))
 			output("Use command 'help' to get a list of available commands")
+
+	return model!

+ 4 - 0
integration/code/pn_interface.alc

@@ -277,6 +277,8 @@ Element function model_loaded(model : Element):
 			output("Unknown command: " + cast_v2s(cmd))
 			output("Use command 'help' to get a list of available commands")
 
+	return model!
+
 Element function main():
 	output("Welcome to the Model Management Interface, running live on the Modelverse!")
 	output("Use 'help' command for a list of possible commands")
@@ -361,3 +363,5 @@ Element function main():
 			output("Back in model manager!")
 		else:
 			output("Command not recognized, use 'help' for a list of possible commands")
+
+	return!

+ 4 - 0
integration/code/pn_semantics.alc

@@ -123,6 +123,8 @@ Void function main():
 			else:
 				output("Non-conforming model: " + verify_result)
 
+	return!
+
 Void function execute_petrinet(model : Element):
 	String cmd
 	while (True):
@@ -147,3 +149,5 @@ Void function execute_petrinet(model : Element):
 		else:
 			output("Did not understand command!")
 			output("Use 'help' for a list of available options")
+
+	return!

+ 2 - 0
integration/code/power.alc

@@ -9,3 +9,5 @@ Integer function power(base : Integer, exponent : Integer):
 Void function main():
 	while (True):
 		output(power(input(), input()))
+
+	return!

+ 2 - 0
integration/code/remainder.alc

@@ -3,3 +3,5 @@ include "lib_remainder.alc"
 Void function main():
 	while(True):
 		output(remainder(input(), input()))
+
+	return!

+ 2 - 0
integration/code/revert.alc

@@ -19,3 +19,5 @@ String function revert_string(a : String):
 Void function main():
 	while (True):
 		output(revert_string(input()))
+
+	return!

+ 2 - 0
integration/code/rpgame_semantics.alc

@@ -27,6 +27,8 @@ Void function main():
 			else:
 				output("Non-conforming model: " + verify_result)
 
+	return!
+
 String function getHeroTile(model : Element, hero : String):
 	return set_pop(followAssociation(model, hero, "Character_on_tile"))!