General information
Category:
Coding, syntax & commands
Thank you for responding. I am looking for a function to return the position of the first occurance
of any number in a character string. ie m.address = "El Paso, Tx. 79902 "
? at(m.address,FirstNumericalOccurance) would return 14
I have written several routines which return the value, but they are too process intense and slow for a large table:
m.address = "El Paso, Tx. 79902 "
m.position = 0
i=1
for i=1 to len(m.address)
StringValue = substr(m.address,i)
IF type(StringValue) = "N"
m.position = i
break
ENDIF
NEXT
If m.position = 0
? "No number"
ELSE
? "The first number is at "+val(m.position)
ENDIF
Thank you very much for any input.
DG
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only