Post Reply 
Emu48 Edit a CSV File
12-30-2021, 10:30 PM
Post: #3
RE: Emu48 Edit a CSV File
Edit

Program: STORE
Checksum: # C5C6h
Size: 393
Purpose: Removes the line feed characters from a CSV string, and stores individual strings in the form of point number, northing, and easting into a list named PNTS.
Problems: None! The programs works as expected.

<< { } 'PNTS' STO
FILE DUP SIZE 10
CHR 1 1
<< SUB PNTS SWAP +
'PNTS' STO
>> → file size
char start position
Store
<<
DO file start
size SUB DUP char
POS DUP 0 ==
<< file start
size Store EVAL 0
'position' STO 2
DROPN
>>
<< DUP ROT 1
ROT 2 - Store EVAL
DUP 'start' STO+
'position' STO
>> IFTE
UNTIL position
0 ==
END
>>
>>

@ file - local variable, a CSV file stored in FILE
@ size - local variable, the SIZE of the CSV file
@ char - local variable, the line feed character, character 10
@ start - local variable, the start of the next substring after position
@ position - local variable, the position of a line feed character in file
@ Store - subroutine, stores resultant strings

@ Resulting list of strings.

{
"248,1529945.480,521921.773"
"249,1530002.951,521922.245"
"251,1530058.926,521921.687"
"252,1530114.903,521923.001"
"254,1530221.977,521924.059"
}
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)