Home Man
Search
Today's Posts
Register

Discuss whatever is on your mind. New members can introduce themselves. Talk or comment about any topic that's on your mind..

Should we use CODE Tags for terminal input and output?

Tags
discussions

👤 Login to reply

 
Thread Tools Search this Thread
# 1  
Old 07-17-2014
Should we use CODE Tags for terminal input and output?

I've always used code tags for code but not for showing terminal input and output. I noticed a mod edited one of my threads and now I'm confused as to proper protocol.

Mike
# 2  
Old 07-17-2014
Yes, use them for terminal input and output as well.

It's better than setting random colors and fonts, or labelling them with
----------------output starts here-------------------------
...or letting people guess where it begins and ends.
# 3  
Old 07-18-2014
It's also important because multiple spaces will get compressed in 'normal' text, but are respected within code tags.

This is an "X" with fifteen spaces, then another "X" in normal text:-
X X

This is an "X" with fifteen spaces, then another "X" in code tags:-
Code:
X               X

It's much better for clarity of indented code and for crucial fixed-width data.


Thanks for asking
Robin
# 4  
Old 07-18-2014
In addition to what has already been said, CODE tags use a fixed width font. So text like:
iiiiiiiiii
WWWWWWWWWW
which looks like very different line lengths without CODE tags, clearly show that they contain the same number of characters when that same text is displayed using CODE tags:
Code:
iiiiiiiiii
WWWWWWWWWW

And, if your code or data contains tab characters, those tabs are preserved if you copy and paste text from regions of a post that are tagged by CODE or ICODE tags, but copy as spaces when not tagged.

So, yes: always use code tags for full line sample code, input, and output; and use icode tags for partial line, imbedded sample code, input, and output!
# 5  
Old 07-18-2014
It also prevents random sequences of characters from unintentionally becoming smilies.
👤 Login to reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Print Terminal Output Exactly how it Appears in the Terminal to a New Text File mrm5102 Shell Programming and Scripting 7 04-11-2016 06:44 PM
12. If an ‘88’ Record with BAI Code ‘902’ was found on input file and not written to Output file, re sgoud UNIX for Dummies Questions & Answers 0 07-06-2011 07:30 AM
Vim: Warning: Output is not to a terminal stulancs UNIX for Dummies Questions & Answers 3 12-01-2009 06:50 AM
Number of bytes in terminal input queue w/o blocking and consuming? Lucy.Garfeld Programming 4 01-30-2009 12:04 PM
how to check the user input from terminal mskart UNIX for Dummies Questions & Answers 6 11-30-2008 01:15 PM
Is my terminal input secure? pnp Security 2 08-14-2008 06:48 AM
Terminal Output to a File ?? varungupta UNIX for Advanced & Expert Users 2 01-28-2008 02:24 PM
Don't show keyboard input on terminal marianor31 Shell Programming and Scripting 1 03-23-2007 06:54 PM
output to terminal andreis Programming 6 10-16-2003 04:59 AM
How to suppress input keying from displaying on terminal. liteyear18 UNIX for Dummies Questions & Answers 2 07-19-2001 09:13 AM


All times are GMT -4. The time now is 02:05 AM.

Unix & Linux Forums Content Copyright©1993-2018. All Rights Reserved.
UNIX.COM Login
Username:
Password:  
Show Password