Button 1 Label CalculatePrimes
Button CalculatePrimes Color Green
Stop

Label CalculatePrimes
	Variable Numeric n1 = 2
	
	For v1 = 2 To Infinity
		Variable Numeric flag = 0
		For v2 = 2 To n1 - 1
			If Mod(n1, v2) = 0
				flag = 1
				Exit
			EndIf
		Next
		If flag = 0
			Print n1 + CRLF
		EndIf
		n1 = n1 + 1
		If n1 > 1E99
			Return
		EndIf
	Next
Return


