Community talk about communities.sas.com. Meta!

Code formatting

Reply
Super User
Super User
Posts: 7,401

Code formatting

Hi,

 

I am not sure if its just me, or if its a product of the new forum, or new tools produced by SAS, but every post which comes up now appears to have some random code formatting which makes the code unreadable.  For example something like:

proc sort data=ABCDEFFGG; by Var1 
NEWvat1; data wANT; set xYZ; 
proc sql; 
create table NewTable1 as select a.XYA /* Comment to say that this creates a table */
,b.XYZ/*,C.TYR*/ from
tableA a left join....

Its quite annoying and means having to copy the code out, format it so its readable, before even looking at the question.  Is it me being more fussy, or is GPP just been thrown out of the window?

Super User
Posts: 5,081

Re: Code formatting

FWIW, I found that this happens when I post using an older version of Internet Explorer, but not when using a newer browser.

Community Manager
Posts: 291

Re: Code formatting

Hi @RW9, I wanted to get back with you to see if you are using the SAS syntax highlighter when that happens? (Running man icon in community editor tool). 

 

If so, I can try to replicate the problem and see if there is a fix. 

 

@Astounding, thanks for the information about the different browsers.

 

 

Super User
Super User
Posts: 7,401

Re: Code formatting

Hi,

 

Sorry, been away on holiday.  No, its not something I am doing.  What I mean is that posts in general are now looking this way.  Wether this is to do directly with problems copy/pasting, or just a general slide into bad programming techniques (or maybe its generated code from one of the newer products) I cant tell.  But having poorly written code, i.e. not following basic good programming practice (mixing case, lots of code on each line, no indetation etc.) makes answering the questions a lot harder as first I have to copy the code out, format it so it is readable, for example the code I posted in my original post, its obfuscated, and thus requires a time to understand the code.  

 

It could just be me, but this only seems to have really come up (on virtually all posts now), either at the time of switch to new forum or thereabouts, which leads me to wonder if it is Visual Analytics or something generating this code people post, or something else has changed.

Ask a Question
Discussion stats
  • 3 replies
  • 516 views
  • 1 like
  • 3 in conversation