14 lines
490 B
Text
14 lines
490 B
Text
getIntegers:
|
|
integers = TextWindow.Read()
|
|
spacePosition = Text.GetIndexOf(integers, " ")
|
|
If spacePosition = 0 Then
|
|
TextWindow.WriteLine("Please enter two integers.")
|
|
Goto getIntegers
|
|
EndIf
|
|
A = Text.GetSubText(integers, 1, spacePosition - 1)
|
|
B = Text.GetSubTextToEnd(integers, spacePosition + 1)
|
|
If A < -1000 Or A > 1000 Or B < -1000 Or B > 1000 Then
|
|
TextWindow.WriteLine("Integers are outside the range -1000 to 1000. Try again.")
|
|
Goto getIntegers
|
|
EndIf
|
|
TextWindow.WriteLine(A + B)
|