explode "x,y","a,b","m,n" (Documentation Bugs and Problems)

by Jim ⌂ @, Russell, KY, Thursday, October 09, 2014, 14:42 (1104 days ago) @ DickStomp

Been covered up with school. Thought I would post how I would do it (maybe).

name$ = "Name"
account$ = "123456789"
amount$ = "1234,56"
debcred$ = "D"
reason$ = "reason, you know"
address$ = "myaddress city"

# construct a bank record
bank$ = chr(34)+name$+chr(34)+","+chr(34)+account$+chr(34)+","
bank$ = bank$ +chr(34)+amount$+chr(34)+","+chr(34)+debcred$+chr(34)+","
bank$ = bank$ +chr(34)+reason$+chr(34)+","+chr(34)+address$+chr(34)

#### simple down and dirty
#### ASSUMES THAT ALL FIELDS HAVE QUOTE MARKS
####
stuff$ = mid(bank$,2,length(bank$)-2) # strip quotes off of end
stuff$ = explode(stuff$,'","')
for t = 0 to stuff$[?]-1
print t + " " + stuff$[t]
next t


Complete thread:

 RSS Feed of thread

powered by my little forum