got$ = GetOneTimeAmount$("Test")
Dim minOption
, maxOption
, haltAndDisplay
, xPos
, yPos
, highlightedOption
As Integer Dim years1
, days1
, hours1
, minutes1
, seconds1
, keyWasPressed
, timerStarted
As Integer
differentTime1:
highlightedOption = 4: haltAndDisplay = TRUE: keyWasPressed = FALSE
isLessThan = FALSE: notZero = TRUE: Increment = 1
minOption = 4: maxOption = 8
If highlightedOption
>= 4 And highlightedOption
<= 8 Then xPos = xPos + 18
Color 14, 1:
Locate yPos
+ 2, xPos
+ 0:
Print Using "###"; days1
+ 1 ': IF days1 + 1 >= 0 AND days1 + 1 < 10 THEN
b1$ = "YYYY DDD HH MM SS"
a1$ = ""
a1$ = "0000"
a1$ = "000" + S$(years1)
a1$ = "00" + S$(years1)
a1$ = a1$ + "0" + S$(years1)
a1$ = a1$ + S$(years1)
a1$ = a1$ + ":"
a1$ = a1$ + "000"
a1$ = a1$ + "00" + S$(days1)
a1$ = a1$ + "0" + S$(days1)
a1$ = a1$ + S$(days1)
a1$ = a1$ + ":"
a1$ = a1$ + "00"
a1$ = a1$ + "0" + S$(hours1)
a1$ = a1$ + S$(hours1)
a1$ = a1$ + ":"
a1$ = a1$ + "00"
a1$ = a1$ + "0" + S$(minutes1)
a1$ = a1$ + S$(minutes1)
a1$ = a1$ + ":"
a1$ = a1$ + "00"
a1$ = a1$ + "0" + S$(seconds1)
a1$ = a1$ + S$(seconds1)
haltAndDisplay = FALSE
' LOCATE 48, 1: PRINT a1$
keyWasPressed = TRUE
Increment = 10
keyWasPressed = FALSE
Increment = 1
years1 = years1 - Increment
If years1
<= -1 Then years1
= 9999 days1 = days1 - Increment
If days1
<= -1 Then days1
= 365 hours1
= hours1
- Increment:
If hours1
<= -1 Then hours1
= 23 minutes1
= minutes1
- Increment:
If minutes1
<= -1 Then minutes1
= 59 seconds1
= seconds1
- Increment:
If seconds1
<= -1 Then seconds1
= 59 haltAndDisplay = TRUE
years1 = years1 + Increment
If years1
>= 10000 Then years1
= 0 days1
= days1
+ Increment:
If days1
>= 366 Then days1
= 0 hours1
= hours1
+ Increment:
If hours1
>= 24 Then hours1
= 0 minutes1
= minutes1
+ Increment:
If minutes1
>= 60 Then minutes1
= 0 seconds1
= seconds1
+ Increment:
If seconds1
>= 60 Then seconds1
= 0 haltAndDisplay = TRUE
highlightedOption = highlightedOption + 1
If highlightedOption
> maxOption
Then highlightedOption
= minOption
haltAndDisplay = TRUE
highlightedOption = highlightedOption - 1
If highlightedOption
< minOption
Then highlightedOption
= maxOption
haltAndDisplay = TRUE
notZero = TRUE
notZero = FALSE
' isLessThan = FALSE
' IF years1 < years2 THEN isLessThan = TRUE
' IF years1 = years2 AND days1 < days2 THEN isLessThan = TRUE
' IF days1 = days2 AND hours1 < hours2 THEN isLessThan = TRUE
' IF days1 = days2 AND hours1 = hours2 AND minutes1 < minutes2 THEN isLessThan = TRUE
' IF days1 = days2 AND hours1 = hours2 AND minutes1 = minutes2 AND seconds1 < seconds2 THEN isLessThan = TRUE
' IF isLessThan = TRUE THEN
' userCommand$ = ""
' a$ = "Time 1 cannot be less than Time 2": LOCATE yPos - 8, Center(a$): COLOR 12, 0: PRINT a$
' _DELAY (2.5)
' a$ = " ": LOCATE yPos - 8, Center(a$): COLOR 14, 1: PRINT a$
' END IF
If notZero
= TRUE
Then 'AND isLessThan = FALSE THEN ' LOCATE yPos + 10, 1 'xPos - 10
' PRINT "here": ll$ = P$
this$ = "You have selected "
lftNum
= Int(years1
/ 1000) this$ = this$ + S$(lftNum) + ","
rtNum = years1 - (lftNum * 1000)
this$ = this$ + S$(rtNum)
this$ = this$ + S$(years1)
this$ = this$ + " year"
If years1
<> 1 Then this$
= this$
+ "s" If (days1
<> 0 And (minutes1
<> 0 Or hours1
<> 0 Or seconds1
<> 0)) Or (hours1
<> 0 And (minutes1
<> 0 Or seconds1
<> 0)) Or (minutes1
<> 0 And seconds1
<> 0) Then this$ = this$ + ", "
this$ = this$ + " and "
this$ = this$ + S$(days1) + " day"
If days1
<> 1 Then this$
= this$
+ "s" If (hours1
<> 0 And (minutes1
<> 0 Or seconds1
<> 0)) Or (minutes1
<> 0 And seconds1
<> 0) Then this$ = this$ + ", "
this$ = this$ + " and "
this$ = this$ + S$(hours1) + " hour"
If hours1
<> 1 Then this$
= this$
+ "s" this$ = this$ + ", "
this$ = this$ + " and "
this$ = this$ + S$(minutes1) + " minute"
If minutes1
<> 1 Then this$
= this$
+ "s" If seconds1
<> 0 Then this$
= this$
+ " and " this$ = this$ + S$(seconds1) + " second"
If seconds1
<> 1 Then this$
= this$
+ "s" a$
= "Is this correct?":
Locate yPos
+ 12, Center
(a$
):
Print a$
a$ = "You have selected 0. Is this correct?"
montH = 1: daY = 1: year = 2022
years1 = 0: days1 = 0: hours1 = 0: minutes1 = 0: seconds1 = 0
' years2 = 0: days2 = 0: hours2 = 0: minutes2 = 0: seconds2 = 0
haltAndDisplay = TRUE
GetOneTimeAmount$ = a1$