Liberty BASIC Community Forum
« OutPUT file problem. »

Welcome Guest. Please Login or Register.
Feb 18th, 2018, 3:41pm


Rules|Home|Help|Search|Recent Posts|Notification


« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: OutPUT file problem.  (Read 69 times)
Chester
New Member
Image


member is offline

Avatar




PM


Posts: 12
xx OutPUT file problem.
« Thread started on: Feb 9th, 2018, 11:40pm »

dim folks$ (5)
print " GETitDONE-OUTPUT.bas"
'print
print " Enter up to (5) names."
print " A zero or blank entry ends the input."

[rightOn]
print
print " Entry "; index + 1
input " Key in folks's name:"; folksName$
if folksName$ = "" then [endSeries]
if folksName$ = "0" then [endSeries]
folks$(index) = folksName$
index = index + 1
if index < 5 then [rightOn]

[endSeries]
xxxcount = index
if xxxcount = 0 then print "No entries. " : end
print "Entries completed."
print
print "---------------------------------------"
for index = 0 to xxxcount - 1
print folks$(index)
next index

open "cgjwmp.dat" for output as #xxxcg
for index = 1 to xxxcount
print #xxxcg, folks$(index)
next index
close #xxxcg
end
'********************************************
'NOTE! can someone help me out?
Problem: If I key (5) names, it will only save (4) names, the first name get chop off.
'********************************************
I am still confuse about how this works, I was told to make index = 1 at the start. Can someone be more clear on what to take out or add?
« Last Edit: Feb 10th, 2018, 09:03am by Chester » User IP Logged

Rod
Global Moderator
ImageImageImageImageImage


member is offline

Avatar

Graphics = goosebumps!


PM

Gender: Male
Posts: 5655
xx Re: OutPUT file problem.
« Reply #1 on: Feb 10th, 2018, 02:49am »

You are saving the first name to folk$(0) Just make index = 1 at the start, then you donít need this
print " Entry "; index + 1
which is confusing you.
« Last Edit: Feb 10th, 2018, 03:54am by Rod » User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Rules|Home|Help|Search|Recent Posts|Notification

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls