home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / mac / hypercar / 4108 < prev    next >
Encoding:
Internet Message Format  |  1992-11-08  |  1.4 KB

  1. Path: sparky!uunet!ogicse!das-news.harvard.edu!husc-news.harvard.edu!husc8!lward
  2. From: lward@husc8.harvard.edu (Lester Ward)
  3. Newsgroups: comp.sys.mac.hypercard
  4. Subject: Re: changing delimiter char??
  5. Message-ID: <lward.721081128@husc8>
  6. Date: 6 Nov 92 20:18:48 GMT
  7. Article-I.D.: husc8.lward.721081128
  8. References: <168978E98.KGODDEN@cmsa.gmr.com>
  9. Lines: 28
  10. Nntp-Posting-Host: husc8.harvard.edu
  11.  
  12. KGODDEN@cmsa.gmr.com writes:
  13.  
  14. >If I have a string say, "a b c" and get the second word, it'll return "b"
  15. >because the space is a delimiter.  I am pretty sure that there is a way
  16. >to *change* the delimiter to any character, say '^', but I cannot find any
  17. >reference to this in the Hypertalk reference manual.  Can someone please
  18. >tell me how to do this?  I think there is a parameter to set.  What I *really*
  19. >want to do is have  a string like "foo bar^fubar^fu the bar^..." and if I
  20. >get the FIRST 'word' (or item?) it should return "foo bar" and so on.
  21. >If anyone posts an answer before Monday, could you please also send me
  22. >email at foobaz@AOL.com
  23. >so I can read it at home during the weekend?
  24. >Thanks!!!!!!!!!!!!!!
  25. >-Kurt
  26. >-------------
  27. >"I distrust a research person who is always obviously busy on a task."
  28. >-Robert A. Frosch, VP, GM Research
  29.  
  30. set ItemDelimiter to "^"
  31.  
  32. Then 
  33.  
  34.  put item 1 of "foo bar^fubar^fu the bar"
  35.  
  36. will put "foo bar" in the message box.
  37.  
  38. Les
  39. Programmer, FAS Computer Services, Harvard University
  40.