|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Yesterday @ 12:10 PM
Points: 7,185,
Visits: 7,285
|
|
paul.goldstraw (2/25/2010) I would say fixed width makes it easier to indent your code since every character fits in a same size block. For me, that's the only reason, it's mere personal preference beyond that. Not sure if others have other reasons why? I'm not sure there are any fixed width fonts that let me use even a full range of eurpean latin-based alphabets, let alone Cyrillic and Arabic too, and certainly not Japanese, Chinese, Korean and various Indian alphabets. Since I have worked mostly in a fairly international environments, and want to work usually in Unicode, this tends to force me onto variable width fonts. Of course it then makes sense to use fixed width (measured in inches or metres or whatever) tabs, rather than letting tabs represent a number of characters from the margin.
Tom Is minic a gheibheann béal oscailte dorn dúnta. Is minig a cheapas beul fosgailte dòrn dùinte.
http://es.linkedin.com/in/tomthomsonsoftware
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Thursday, June 13, 2013 8:50 PM
Points: 3,208,
Visits: 4,178
|
|
bc_ (2/25/2010) is there an advantage to using a fixed width font? or is it personal preference? Fixed-width fonts allow to adjust and beautify a piece of code easily.
Simple example (Courier New):
CREATE TABLE #TEST_TABLE ( Id INT NOT NULL IDENTITY, Customer_Id INT NOT NULL, Customer_Name VARCHAR(100) NOT NULL, Invoice_Id INT NULL, Invoice_Total MONEY NULL, Invoice_Tax MONEY NULL, Discount_Percent NUMERIC(5,2) NULL ) With Arial Black, this code will look like:
CREATE TABLE #TEST_TABLE ( Id INT NOT NULL IDENTITY, Customer_Id INT NOT NULL, Customer_Name VARCHAR(100) NOT NULL, Invoice_Id INT NULL, Invoice_Total MONEY NULL, Invoice_Tax MONEY NULL, Discount_Percent NUMERIC(5,2) NULL ) Alignment is not as good as before, and (it's more important) another developer will see a total mess when he/she opens the code in his/her SSMS. I think the developer will not be happy 
Delphi, Clarion, Visual Studio, Query Analyzer, SSMS, PL/SQL Developer - all of these use fixed-width fonts by default...
|
|
|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Monday, March 04, 2013 4:10 AM
Points: 532,
Visits: 281
|
|
Fatal Exception Error (2/23/2010) Good Question
I got it right but for the wrong reason's(process of elimination) in my opinion.
I must say I am not a fan of the image since I could not copy the SQL and format it(not run it) to my liking. Don't see why you'd consider that the wrong reason - worked just as well for me.
To (badly?) quote Sherlock Holmes (or Sir A. C. Doyle if you prefer) "Once you have elimiated the impossible, then whatever is left, however improbable, must be the answer"...
Kelsey Thornton MBCS CITP
|
|
|
|
|
Mr or Mrs. 500
      
Group: General Forum Members
Last Login: Monday, March 04, 2013 4:10 AM
Points: 532,
Visits: 281
|
|
Tom.Thomson (2/25/2010)
paul.goldstraw (2/25/2010) I would say fixed width makes it easier to indent your code since every character fits in a same size block. For me, that's the only reason, it's mere personal preference beyond that. Not sure if others have other reasons why?I'm not sure there are any fixed width fonts that let me use even a full range of eurpean latin-based alphabets, let alone Cyrillic and Arabic too, and certainly not Japanese, Chinese, Korean and various Indian alphabets. Since I have worked mostly in a fairly international environments, and want to work usually in Unicode, this tends to force me onto variable width fonts. Of course it then makes sense to use fixed width (measured in inches or metres or whatever) tabs, rather than letting tabs represent a number of characters from the margin.
I always use the "so-called"(?) fixed-width fonts in code and eschew tabs like the plague. The latter is a klingon from an ancient Fortran compiler which would crash if it saw a tab anywhere EXCEPT as the very first character on a line. I still hate tabs in code as my colleagues will no doubt attest.  The only place where I use tabs is in word-processed documentation (where it *is* better).
Kelsey Thornton MBCS CITP
|
|
|
|
|
SSChampion
        
Group: General Forum Members
Last Login: Yesterday @ 10:48 AM
Points: 10,990,
Visits: 10,578
|
|
|
|
|