Commas in string variable?
#1
This might be one of those things that "everyone knows," but I missed the memo. Is there any way to input a string variable which includes commas?

For example, in NMEA 0183 "sentences," all field delimiters are commas. Of course, one option is to change all commas to something else, like semicolons or just spaces. Which I have done, and then afterwards replaced that delimiter with a proper comma.

Is there any way I could input the actual NMEA string as one variable, then in the next step split out each character? I didn't see anything about this limitation in the wiki.

Here is an example of a NMEA 0183 GLL sentence, from a GPS receiver (identified by GP), which provides geo position, UTC time, and "mode," always in ASCII:

$GPGLL,3953.88008971,N,10506.75318910,W,034138.00,A,D*7A

The last two characters, after the * character, are the XOR-based checksum, as two hex characters.
Reply
#2
LINE INPUT var$
Reply
#3
Well, sumbich, and it works fine too. Thanks again, Steve!
Reply
#4
Did you hear the one about the dog that swallowed the shoe laces? It had strings in colon.

LINE INPUT Pete$
Reply
#5
(09-08-2022, 11:38 AM)Pete Wrote: Did you hear the one about the dog that swallowed the shoe laces? It had strings in colon.

Did you hear the one about the python who swallowed that dog? It resulted in a string in a nested loop:

https://pynative.com/python-nested-loops/

Amazing what we learn on this site.
Reply




Users browsing this thread: 4 Guest(s)