Bad code

Smud

Member
well "meaningful" comments would also be helpful - we have all seen the;

/* add 1 to x */
ASSIGN X = X + 1.

but your point is .... poignant
 

Cringer

ProgressTalk.com Moderator
Staff member
Comments can remain unencrypted in r-code. I know this after a customer complained about some of our code in a previous job, where they found the following comment littered through some of the programs:
Code:
/* Give the user the bearskin underwear treatment */
 

Cringer

ProgressTalk.com Moderator
Staff member
Looks like you might be right. This was back in 9.1, and the comments were definitely there in the r-code.
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
Could this depend on the MIN-SIZE option of the COMPILE statement?
No. I suspect the compiler was just changed in some release so that all comments were stripped out.

I just did the following test in 11.3:

comment.p:
Code:
/* fred flintstone */
display.

compile .\comment.p save.
strings comment.r > comment.txt

comment.txt:
Code:
Strings v2.51
Copyright (C) 1999-2013 Mark Russinovich
Sysinternals - www.sysinternals.com

VqF
001B00010005utf-8
00000030
MAIN .\comment.p 1,,
PROGRESS
undefined
.\comment.p

No comment.
 

KrisM

Member
I could go back as far as version 91e, and that version also is already doing the comment stripping.
 

Cringer

ProgressTalk.com Moderator
Staff member
Hmmm that's odd. I wonder what we were doing differently back then? Or maybe my memory is fried! Unless it's somehow different for webspeed r-code... </ClutchingAtStraws>
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
For example, a strings of a webspeed-specific .r shows stuff like this:
<div id="content"><!-- Business logic for page starts here -->
 

TomBascom

Curmudgeon
Always be careful what you put in writing -- stuff has a way of getting around ;)

“Never write when you can talk. Never talk when you can nod. And never put anything in an e-mail.”
— Eliot Spitzer
 
Top