Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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


Possibly Related Threads…
Thread Author Replies Views Last Post
  Variable length type declarations dano 5 689 08-06-2025, 09:53 PM
Last Post: dano
  Determining if variable or static string is passed to a Sub dano 9 1,225 06-20-2025, 06:31 PM
Last Post: CookieOscar
  Most efficient way to build a big variable length string? mdijkens 9 1,893 01-17-2025, 11:36 PM
Last Post: ahenry3068
  Huge array of variable length strings mdijkens 9 1,833 10-17-2024, 02:01 PM
Last Post: mdijkens
  REDIM, TYPE, and STRING Woes TerryRitchie 16 3,155 04-13-2023, 05:17 AM
Last Post: DSMan195276

Forum Jump:


Users browsing this thread: 1 Guest(s)