| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Re: Ascii Text Probs |
> SC> Does anyone know how to load an ASCII text file into AMOS, so it > SC> can successfully be stored in memory say for instructions etc. > In psuedo-basic (Hmm, isn't that what Amos is?) > DIM a$(1000) ; Naturally, 1000 elements is subject > to variation! > ii=0 > OPEN "I",#3,"MyFile" > WHILE NOT EOF(#3) > ii=ii+1 > LINE INPUT #3,a$(ii) > WEND > CLOSE #3 > That'll then load up your textfile into a$(). You'll also know how many > lines of text you have if you store your ii counter somewhere, too! > And since strings in BASIC can be up to 32k long, you might not even need > it in an array, one string might well be enough? > The key commands there are OPEN and LINE INPUT. LINE INPUT takes in a > single linefeed-terminated line, as opposed to INPUT. LINE INPUT basically > ignores all the commas, and inverted commas, etc. Thanks Peter for all of that. Well, this is sadly what is known as MAIL LAG. I had this sorted out a few months back. But thanks again for your help. --- AdeptXBBS v1.07f (Registered)* Origin: Mach One BBS (3:713/615) SEEN-BY: 620/243 621/525 623/630 625/100 711/401 409 413 430 808 809 934 SEEN-BY: 712/515 713/111 317 615 618 700 888 914 714/906 800/1 @PATH: 713/888 711/808 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.