Post Reply 
Emu48 Edit a CSV File
09-04-2022, 09:56 PM (This post was last modified: 09-04-2022 09:58 PM by MNH.)
Post: #26
RE: Emu48 Edit a CSV File
Knowing how many points (point strings, actually) there are in advance and using a definite loop structure eliminates the need to handle a missing line feed character at the end of the last point string. Please note that the PNTS variable is a list of point numbers. The local variable pnezd is called after the definite loop ends so the user can check the output. I renamed the program to CSVO. Kindly test it on your Emu48.

Program: CSVO
Checksum: # D830h
Size: 247 bytes
Purpose: Remove line feed characters from a CSV file.

Code:

\<< FILE DUP SIZE 10
 CHR 1 PNTS SIZE { }
 \-> file size lf
 start numpnts pnezd
  \<< 1 numpnts
    START file DUP
 DUP lf POS DUP 2 -
 ROT start ROT SUB
 pnezd SWAP +
 'pnezd' STO 1 +
 size SUB 'file' STO
    NEXT pnezd
  \>>
\>>

This is the contents of the PNTS variable.

{ 101 102 103 104
105 106 107 108 109
}

Please see the attached file so you can load it in your Emu48 and store it in a variable named FILE.
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)