Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Use of commas in text data import

 [1/3] from: webmaster::siliconspecies::com at: 25-Jul-2000 5:01


Ok. So now I am importing data files made of text. If the imported text data includes a comma, like that. It hangs the process and breaks. Is there a way to specify that the data being imported should be read as text and not to hang on any punctuation? workpath: join currentpath [first path "albumpath.data"] currentdata: join {"} [load to-url workpath {"}] currentalbum: load to-url workpath append block currentdata that is the basic code to import this text data I tried earlier string! or to-string and it removed all the spaces between the words, so that was no good. Thanks Jeff Rubin, CTO/Co-Founder Audiopia Shutup and Listen... http://www.audiopia.com also check out my personal site Brainbyte! http://www.brainbyte.com

 [2/3] from: webmaster:siliconspecies at: 25-Jul-2000 5:19


Duh. I was using load and I change to read and it works fine. later At 05:01 AM 7/25/00 -0500, you wrote:
>Ok. >So now I am importing data files made of text.
<<quoted lines omitted: 16>>
>also check out my personal site Brainbyte! >http://www.brainbyte.com
Jeff Rubin, CTO/Co-Founder Audiopia Shutup and Listen... http://www.audiopia.com also check out my personal site Brainbyte! http://www.brainbyte.com

 [3/3] from: al:bri:xtra at: 25-Jul-2000 22:25


> workpath: join currentpath [first path "albumpath.data"] > currentdata: join {"} [load to-url workpath {"}] > currentalbum: load to-url workpath > append block currentdata
I'm still not sure of your intent. Can you just write what you intend, rather than just trying to write something? You'll then be writing Rebol. Have you looked at using 'read and 'write? This:
> currentalbum: load to-url workpath
could be better written as: current_album: read album If you just want all the commas stripped out of the text, then something like this: while [found find? current_album ","] [ remove find? current_album "," ] I also feel sure that there was an easier way to do the above in rebol, but it's late at night and I'm tired. I hope that helps! Andrew Martin ICQ: 26227169 http://members.xoom.com/AndrewMartin/

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted