Turbo Pascal v.7 Records.

Hi Hypo!
Further to the records question I put to you earlier in January. I have in my record declarations data type 'real.' Using the writeln I enter the headings across the page adding the positions.

When writing to file the real values are in indexed form but positions are pushed out. When I add field widths to the real values I cannot compile the two together, can you advise me please.

Best Wishes..........Chrisbee.
Who is Participating?
HypoConnect With a Mentor Commented:
Ok, In the example you gave me before... You used :6:2 at one place where you use Real variables, but only :6 at another place in the code. Try changing that to :6:2 at all places.

Other than that I need to see a pice of your code before I can help you more.
chrisbeeAuthor Commented:
Hi Hypo!
thanks for the help, Do I understand correct by thinking that the first number is the field width and the second number- the amount of decimal places- I shall apply that thought.

thanks again.

Best wishes..........chrisbee.
yes, you're almost right about that...
But the first number is the MINIMUM field width, and the second number is the number of decimals.
chrisbeeAuthor Commented:
Hi Hypo!

Thanks for the help on this question it works well, however another question awaits you in 'EE' from chrisbee.

Best wishes............chrisbee.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.