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

[REBOL] Re: Serial Communications - SUCCESS!!!

From: brett:codeconscious at: 27-Feb-2002 12:20

> Any pointers in this regard will not be spurned given my recent > experience. > The first pitfall I see is having Rebol mistake this $ sign for a money > "token" and wrap me up in some data type dungeon.
A couple of pointers. --> FIND/MATCH Will allow you to match the beginning of the line. --> PARSE Is I think possibly a better solution for dealing with the lines. If line is one of your example lines (of type string!) then you could try: parse line none parse line "$," parse next line none If these work in all cases (you'll need to check if all the possible characters output by the GPS are handled by these lines correctly), then you might be able to SELECT a block of variable names by using the first code. Then you might be able to SET them all at once with the result from "parse next line none". Or alternatively define some parse rules that "recognise" the various actual line formats. Just ideas, maybe one will be useful :) Brett