12-21-2012, 04:57 PM
I wrote a program to read the copy buffer from Excel and enter values into a web table.
It works fine except the decimal "." character is recognized as a delimiter and I want the decimal in the value output to the table.
I've tried to exclude the decimal "." character in the delimiter array d but can't get it to work
????
john black
garland, tx USA
;; create variables
str s s2 ;;string to store clipboard
ARRAY(str) a ;;array of strings from clipbloard
int i j
int nt ;;number of tokens
;; set delimeters to all blanks < 33, < and >
;; set period to non-delimitter
str d.all(256 2 0)
d.set(1 0 33)
d[34]=1; d['<']=1; d['>']=1; d[46]=0
;; here is the parse routine
nt = tok(s a 1000 d)
for(i 0 nt)
a[i].setsel
key T
It works fine except the decimal "." character is recognized as a delimiter and I want the decimal in the value output to the table.
I've tried to exclude the decimal "." character in the delimiter array d but can't get it to work
????
john black
garland, tx USA
;; create variables
str s s2 ;;string to store clipboard
ARRAY(str) a ;;array of strings from clipbloard
int i j
int nt ;;number of tokens
;; set delimeters to all blanks < 33, < and >
;; set period to non-delimitter
str d.all(256 2 0)
d.set(1 0 33)
d[34]=1; d['<']=1; d['>']=1; d[46]=0
;; here is the parse routine
nt = tok(s a 1000 d)
for(i 0 nt)
a[i].setsel
key T