Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to make TAB in output file

Status
Not open for further replies.

ericc111

Programmer
Jan 3, 2010
3
PL
Hi, i am a new user Fortran and a have got one question about TAB character.
How to make TAB in output file. Example:
somethink ------ somethink ------- somethink

----- is TAB not spaces

Thank you.
 
Hi ericc111

Try this:

Code:
	Program TAB
	character*1 tab
	tab = char(11)
	write(*,'(1x,5a)') 'Something',tab,'something',tab,'something'
	end
 
Horizontal Tab is char(9). char(11) is vertical tab.
 
Hi xwb

Thank you for the correction. I did not remember this, so I looked it up, but clearly "misread" VT for HT. This only shows that one should check the program before submitting it, although it is short or simple !
 
No probs gullipe. I did the same thing when I was in Uni (during my punched card days). I used char(11) and got a lot of blank lines in between the numbers. Got a pretty thick printout: about half an inch tick of numbers running across the page followed by 6 blank lines. Some things, you never forget.
 
Thank gullipe and xwb for help. Yours advise help me a lot :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top