Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Please clarify
#1
Check the following code. In this code total number of elements are 20. When the string is tokenized, number of tokens & array length is returned 17 However on displaying values of array count is 20. Why is this difference. Please clarify. I need number of tokens, array length to be 20 only.

lpstr a=
;IGL,100,345.2,310,311
;ORIENTBANK,1,349.5,301,300
;IGL,100,345.2,310,311
;ORIENTBANK,1,349.5,301,300
ARRAY(str) arr
int nt=tok(a arr -1 ",")
out nt
out arr.len
for nt 0 arr.len
,out arr[nt]
#2
Need new line in separators.

int nt=tok(a arr -1 "[],")
#3
Thanks, Hats off to your knowledge. You have solution to every problem. Great to be associated with you.


Forum Jump:


Users browsing this thread: 1 Guest(s)