-
Notifications
You must be signed in to change notification settings - Fork 44
Files
Aaron Niyonzima edited this page Feb 18, 2023
·
3 revisions
Reading text files(txt, csv, etc) in info basic is done in 3 steps:
- Open file using
OPENSEQ
- Read file (one line at time) using
READSEQ
- Close file using
CLOSESEQ
Let's write a simple program to read a csv file
PROGRAM MTD.ReadFile
dir = '../bnk.interface/EBANK.IN'
filename = 'transaction.csv'
OPENSEQ dir, filename TO ptr THEN
LOOP
READSEQ line FROM ptr ELSE BREAK
CRT line
REPEAT
END ELSE CRT 'Failed to open ': filename
CLOSESEQ ptr
END
- Home
- Getting started with InfoBasic(jbc)
- Key Features of InfoBasic
- Control Flow
- Subroutines and Functions
- OFS
- Template Programming
- T24 Integration with other Systems
- T24 Business Training
- T24 Navigation Training
- T24 Administration Training