Won't Print on Screen

BlitzPlus Forums/BlitzPlus Programming/Won't Print on Screen

Zooker(Posted 2005) [#1]
Function PrnCnfig()
Lokate(5,155):Print Config\AcctIdNo
Lokate(6,155):Print Config\AccountOwner
Lokate(7,155):Print Config\BankName$
Lokate(8,155):Print Config\StartCheckNo
Lokate(9,155):Print Config\StartDate$
Lokate(10,155):Print Config\StartAmt
Lokate(11,155):Print Config\SplitNo$
Lokate(12,155):Print Config\DebitCodes$
Lokate(13,155):Print Config\CreditCodes$
Lokate(14,155):Print Config\AssignDebits$
Lokate(16,155):Print Config\AssignCredits
Lokate(17,155):Print Config\MkCashPayOuts
Lokate(18,155):Print Config\Password
Lokate(19,155):Print Config\LstUnMarkdTrans
Lokate(20,155):Print Config\LstTransNo
Lokate(21,155):Print Config\LstSplitTransNo
Lokate(22,155):Print Config\LstSeqChekNo
Lokate(23,155):Print Config\LstReconcileAmt
Lokate(24,155):Print Config\LstTransBalance

A$ = Input$("In PrnCnfig " + Config\BankName$)
End Function

This is a function that is called after an input function I
coded uses GetKey to get the answers which are put on the screen. The Input function I coded works except for This.
I used the input function as a message box to find out what was Happening. The Input function works and the prompt
is displayed showing the Banks name But that is all that is displayed. Why doesn't everything with a print comand not displayed?


WolRon(Posted 2005) [#2]
Not enough information. Post more code.

By the way, Lokate is LOCATE

Also, each of your locations are only 1 pixel apart (horizontally). You'll probably want more space apart than that ;)


Grey Alien(Posted 2005) [#3]
I figured lokate must have ben one of his own special functions with a similar name for some reason.


Zooker(Posted 2005) [#4]
You are correct Gray Alien. I found a different way to find out If what I entered was truly put into The Record called config. I used a series of inout boxes and indeed I've placed them properly. Do either of you gentlemen know where I could download a snippet showing how you write to a File the Types-End Types I've entered?


Grey Alien(Posted 2005) [#5]
I have see that thing on this forum somewhere but I don't know where. It may be in the code archives. Try a search or hope someone else knows.


Zooker(Posted 2005) [#6]
Thanks


WolRon(Posted 2005) [#7]
Do you mean this?
Type Record
  Field F1
  Field F2
End Type

WriteFile file
For thisRecord.Record = Each Record
  WriteLine file, thisRecord\F1
  WriteLine file, thisRecord\F2
Next
CloseFile file
Or do you mean one function that can output any random Type?

This thread may be of some help...
http://blitzbasic.com/Community/posts.php?topic=43429


Zooker(Posted 2005) [#8]
Type Record
Field F1
Field F2
Feild F3
End Type

WriteFile file
For thisRecord.Record = Each Record
WriteLine file, thisRecord\F1
WriteLine file, thisRecord\F2
WriteString file, thisRecord\F3
Next
CloseFile file

I'm trying to save the above Type & End Type that Iam displaying on the screen in the 1st post above!


WolRon(Posted 2005) [#9]
Well, what you just wrote above would do it just fine.
The only thing you might want to add is a count to your savefile so that you will know how many Types to load when you try to load them.

Just add something like this to count them:
For thisRecord.Record = Each Record
  count = count + 1
Next

WriteFile file
WriteInt file, count
For thisRecord.Record = Each Record
  WriteLine file, thisRecord\F1
  WriteLine file, thisRecord\F2
  WriteString file, thisRecord\F3
Next
CloseFile file
And then to load
OpenFile file
ReadInt file, count
For iteration = 1 to count
  thisRecord.Record = New Record
  thisRecord\F1 = ReadLine(file)
  thisRecord\F2 = ReadLine(file)
  thisRecord\F3 = ReadString(file)
Next
CloseFile file