Post Reply 
Emu48 Edit a CSV File
01-08-2022, 11:22 AM
Post: #15
RE: Emu48 Edit a CSV File
Several minor variations of the STORE routine provided above make it possible to output potentially useful objects from the source string.

Example 1

The following STORE code could be used to create a simple list of all of the numbers:
Code:
\<<
   FILE
   "{" SWAP +
   "}" +
   "," " " REPLS
   STR\->
   'PNTS' STO
\>>
PNTS: { 248 1529945.48 521921.773 249 1530002.951 521922.245 251 1530058.926 521921.687 252 1530114.903 521923.001 254 1530221.977 521924.059 }

Example 2

This version is similar to Example 1, but the numbers are encapsulated into sublists of 3:
Code:
\<<
   FILE
   "{{" SWAP +
   "}}" +
   "," " " REPLS
   10 CHR "} {" REPLS
   STR\->
   'PNTS' STO
\>>
PNTS: { { 248 1529945.48 521921.773 } { 249 1530002.951 521922.245 } { 251 1530058.926 521921.687 } { 252 1530114.903 521923.001 } { 254 1530221.977 521924.059 } }

Example 3

Similar to Example 2, but the index number is dropped from each sublist:
Code:
\<<
   FILE
   "{{" SWAP +
   "}}" +
   "," " " REPLS
   10 CHR "} {" REPLS
   STR\->
   1 \<< TAIL \>> DOLIST
   'PNTS' STO
\>>
PNTS: { { 1529945.48 521921.773 } { 1530002.951 521922.245 } { 1530058.926 521921.687 } { 1530114.903 521923.001 } { 1530221.977 521924.059 } }

Depending on how you need to process the data, some of these variations might enable simpler code for subsequent programs.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Emu48 Edit a CSV File - MNH - 12-30-2021, 07:24 AM
RE: Emu48 Edit a CSV File - MNH - 12-30-2021, 04:34 PM
RE: Emu48 Edit a CSV File - MNH - 12-30-2021, 10:30 PM
RE: Emu48 Edit a CSV File - DavidM - 12-31-2021, 10:54 AM
RE: Emu48 Edit a CSV File - MNH - 12-31-2021, 06:11 PM
RE: Emu48 Edit a CSV File - MNH - 01-01-2022, 04:41 AM
RE: Emu48 Edit a CSV File - DavidM - 01-04-2022, 03:48 PM
RE: Emu48 Edit a CSV File - MNH - 01-04-2022, 11:32 PM
RE: Emu48 Edit a CSV File - DavidM - 01-05-2022, 12:14 PM
RE: Emu48 Edit a CSV File - DavidM - 01-08-2022 11:22 AM
RE: Emu48 Edit a CSV File - MNH - 01-08-2022, 04:41 PM
RE: Emu48 Edit a CSV File - MNH - 01-08-2022, 07:41 PM
RE: Emu48 Edit a CSV File - DavidM - 01-09-2022, 02:34 PM
RE: Emu48 Edit a CSV File - DavidM - 01-10-2022, 10:50 AM
RE: Emu48 Edit a CSV File - MNH - 01-09-2022, 08:39 PM
RE: Emu48 Edit a CSV File - rprosperi - 01-10-2022, 04:01 AM
RE: Emu48 Edit a CSV File - DavidM - 01-10-2022, 12:41 PM
RE: Emu48 Edit a CSV File - DavidM - 01-14-2022, 04:25 PM
RE: Emu48 Edit a CSV File - MNH - 01-15-2022, 07:34 PM
RE: Emu48 Edit a CSV File - MNH - 01-04-2022, 11:06 PM
RE: Emu48 Edit a CSV File - John Keith - 12-31-2021, 06:51 PM
RE: Emu48 Edit a CSV File - MNH - 12-31-2021, 07:58 PM
RE: Emu48 Edit a CSV File - MNH - 01-04-2022, 11:39 PM
RE: Emu48 Edit a CSV File - Eric Rechlin - 01-05-2022, 03:22 PM
RE: Emu48 Edit a CSV File - MNH - 09-04-2022, 09:56 PM



User(s) browsing this thread: 1 Guest(s)