HP Forums
Comments, only comments - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Comments, only comments (/thread-4313.html)



Comments, only comments - salvomic - 07-06-2015 07:24 PM

In these days I search mostly one thing, in the Prime: /* block comments */
I need them to test my program, I can't stand to prefix every lines with //
:-)

Salvo


RE: Comments, only comments - Marcel - 07-06-2015 07:31 PM

HI!
This is exactly what I do..
//
//
//
//
This is very long...
Marcel


RE: Comments, only comments - salvomic - 07-06-2015 07:35 PM

(07-06-2015 07:31 PM)Marcel Wrote:  HI!
This is exactly what I do..
//
//
//
//
This is very long...
Marcel

yes, in fact, very very long...
I would prefer this:
Code:

/*
here
my long lines
don't execute them
they are hidden
*/

so we could confront blocks of program quickly...

Salvo


RE: Comments, only comments - BruceH - 07-06-2015 10:03 PM

Code:

IF 0 THEN 
 here
 my long lines
 don't execute them
 they are hidden
END

The lines still have to be syntactically correct though, alas.


RE: Comments, only comments - StephenG1CMZ - 07-06-2015 10:19 PM

Myself I prefer much comments to be nestable, so I can write
Code:
/* right now I don't want to do this
/* and I never do this */
OK 
*/
But most languages don't allow that and would execute the OK.

Until block comments are implemented you could try using subroutines:

Code:
 export maybeDo
A
B
C
End

// maybeDo
One // takes out A B and C.


RE: Comments, only comments - StephenG1CMZ - 07-06-2015 10:41 PM

(07-06-2015 10:03 PM)BruceH Wrote:  
Code:

IF 0 THEN 
 here
 my long lines
 don't execute them
 they are hidden
END

The lines still have to be syntactically correct though, alas.

If I remember correctly the equivalent syntax on the ti-83 only required the syntax to be correct in the If true case...it was not checked in the If false case. How about the Prime?