James Carlson wrote:
> Roland Mainz writes:
> > * Be carefull with using TABS in script code, they are not portable
> > between editors or platforms
> 
> Could you clarify this one, please?
> 
> Are you referring to the ASCII TAB (0x09) character?

Yes...

> If so, what's
> not "portable" about it?

Maybe "portable" was the wrong word...
... unlike C/C++/JAVA code the TAB charatcer cannot be used
interchangeably with normal SPACES in shell scripts. TABs have a special
meaning (as part of ${IFS} and elsewhere like in here-documents) and
enforcing a policy which requires to use TABs within the code can only
go wrong that way for larger scripts (for example if you go to
usr/demo/ksh/fun/gnaw and replace all cases of 8 spaces in a row with a
TAB the script will no longer run propperly).
Or short: You cannot apply the "cstyle" rule for TABs 1:1 to a shell
style document (and enforcing a 80 character line length limit is IMO
not a good idea either... 132 characters is fine (see audiotest.ksh for
an example where a 78 charatcer limit would be a problem (e.g. large
amounts of data which only fit properly within 132 characters but not in
78 chars))).

> Are you hinting at the people who
> misconfigure their editors away from the Right And True 8-character
> tab stops to something bizarre such as 4-character?

Partially I am hinting at editors like the xx@@@@!! in Gnome which
defaults to silently convert a row of SPACES into TABs (I just pray that
I never find out the address of the person who did that... xx@@@!!!...
;-( )

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)

Reply via email to