Code: [Select all] [Download] GeSHi © Codebox Plus
if year > oldyear
msgbox yay
year = 2134
oldyear = 0
No msgbox, but if I change it to:
Code: [Select all] [Download] GeSHi © Codebox Plus
if year > 0
msgbox yay
Got msgbox with "yay"
What am I missing here?
Full code:
Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus
string = "year: 2134 month: 11"
oldyear := 0
string := SubStr(string, InStr(string, "year: ") + 6) ; =2134 month: 11"
year := SubStr(string, 1, 1)
j := 2
Loop
{
If Not (SubStr(string, j, 1) = " ")
{
year := year . SubStr(string, j, 1)
j++
}
Else Break
}
if year > oldyear
msgbox yay