"crawfishmedia" wrote:
Function SetNextOffset(nextOffset as Integer)
nextOffset = nextOffset+50
nextoff = Stri(nextOffset)
nextoff = nextoff.Trim()
return next off ' but I need to return nextOffset too...
End Function
"EnTerr" wrote:"crawfishmedia" wrote:
Function SetNextOffset(nextOffset as Integer)
nextOffset = nextOffset+50
nextoff = Stri(nextOffset)
nextoff = nextoff.Trim()
return next off ' but I need to return nextOffset too...
End Function
I can't imagine using such function to end well. It will be awkward to de-compose the returned result (be it hash or array). Better make an object that holds the offset as a state and add a method (say `getNextOffset`) that returns current offset as string and bumps up the offset
offsetter = {
nextOffset : 0,
getNext : Function()
m.nextOffset = m.nextOffset + 50
return m.nextOffset.ToStr()
End Function
}
x = offsetter.getNext()
"destruk" wrote:
Stri(nextoffset).Trim()