Lockup Using ToInteger more than once
nrandal
Posts: 5
The first conversion of a string to an integer works perfectly. The second attempt locks the server up.
PRI SetTime(id) | temp, seconds, minutes, hour, day, date, month, year temp := Request.Get(id, @qYear) year := ToInt(temp) #> 2011 <# 2020 temp := Request.Get(id, @qMonth) month := ToInt(temp) #> 1 <# 12 temp := Request.Get(id, @qDate) date := ToInt(temp) #> 1 <# 31 temp := Request.Get(id, @qDayWeek) day := ToInt(temp) #> 1 <# 7 temp := Request.Get(id, @qHour) hour := ToInt(temp) #> 0 <# 23 temp := Request.Get(id, @qMinutes) minutes := ToInt(temp) #> 0 <# 59 temp := Request.Get(id, @qSeconds) seconds := ToInt(temp) #> 0 <# 59 PRI ToInt(strPtr) : int | ndx if strPtr == 0 return 0 bytemove(@numBuff, strPtr, strsize(strPtr) <# 10) int := str.ToInteger(@numBuff) bytefill(@numBuff, 0, 10)
Comments