code: continuation of a line

Hello,

What is the character(s) for continuation of a line? Is it "//-" is so, I cannot it to work what am I doing wrong? Does DXl have a 80 character limit?

Thank you,
Jim

{
                        Filter f = ((((((((isNull(attribute("_NC+ Req")) || isNull(attribute("_NC Req"))) || isNull(attribute("_Level 2 Req"))) || isNull(attribute("_Criticality"))) || isNull(attribute("_1E Req"))) || isNull(attribute("_Req Type"))) && (attribute "_Req Eval" == "R - Requirement")) || ((((((notNull(attribute("_Req Type")) || notNull(attribute("_NC+ Req"))) || notNull(attribute("_NC Req"))) || notNull(attribute("_Criticality"))) || notNull(attribute("_Level 2 Req"))) || notNull(attribute("_1E Req"))) && isNull(attribute("_Req Eval")))) || ((((((notNull(attribute("_Req Type")) || notNull(attribute("_NC+ Req"))) || notNull(attribute("_NC Req"))) || notNull(attribute("_Criticality"))) || notNull(attribute("_Level 2 Req"))) || notNull(attribute("_1E Req"))) && (attribute "_Req Eval" != "R - Requirement"))) || (isNull(attribute("_Req Type")) && (attribute "_Req Eval" == "R - Requirement"))
                                
                                set(CurrentModule, f, accepted, rejected) 
                                Total = accepted + rejected
                                buf += accepted "," rejected "," Total ""
}

SystemAdmin - Tue Oct 11 23:49:30 EDT 2011

Re: code: continuation of a line
PDU - Wed Oct 12 01:15:19 EDT 2011

Hi,

i have not find limit for the number of characters of a line, but i am sure that more than 80, if limit exist.

I think the true limit is the size of your screen.

In the DXL Help :

Any newlines or spaces occurring immediately after the following tokens are ignored: ;  ,  ?  :  =  (  +  *  [ &  -  !  ~  /  %  <<  >> <=  >=  ==  !=  ^  |  && and  ||  or  ^^  +=  -=  *=  /=  %= <<=  >>=  &=  |=  ^=  <-  :=  =>  .. .  ->  ::  \   Any newlines before an

else or a ) are ignored. All other newlines delimit a possibly empty statement. Multiple consecutive areas of white space containing newlines are treated as single newlines. The recognition of a newline can be avoided by prefixing it with an empty
// comment or a comment ending in -.

Pierre

Re: code: continuation of a line
llandale - Wed Oct 12 15:27:05 EDT 2011

As stated, the interpreter knows there must be continuation when the end of a line is an operand
requiring another parameter,so you don't need to say so:

if (A           or
    (B and C)  or
    D)  Go do something.
 
ProcessPlants( NameTree,
       NameFlower,
       NameMoss,       // this comment must end in a dash -
       NameBee)


Yes you can force continuation with an empty comment "//", or "// one that ends in a dash-"

 

string MyFullName = 
    "Alphonso"   // Maternal Grandfather -
    " Englebert" // Paternal Grandmother -
    " Poindexter" //
    " Failure"    // 
    " This line not part of the name because the previous comment ended in a space, and therefore doesn't continue"
print MyFullName


For me this was quite intuitive and I had no trouble with it from DXL day one.

 

 

 

  • Louie

 

 

Re: code: continuation of a line
SystemAdmin - Thu Oct 13 09:45:29 EDT 2011

llandale - Wed Oct 12 15:27:05 EDT 2011

As stated, the interpreter knows there must be continuation when the end of a line is an operand
requiring another parameter,so you don't need to say so:

if (A           or
    (B and C)  or
    D)  Go do something.
 
ProcessPlants( NameTree,
       NameFlower,
       NameMoss,       // this comment must end in a dash -
       NameBee)


Yes you can force continuation with an empty comment "//", or "// one that ends in a dash-"

 

string MyFullName = 
    "Alphonso"   // Maternal Grandfather -
    " Englebert" // Paternal Grandmother -
    " Poindexter" //
    " Failure"    // 
    " This line not part of the name because the previous comment ended in a space, and therefore doesn't continue"
print MyFullName


For me this was quite intuitive and I had no trouble with it from DXL day one.

 

 

 

  • Louie

 

 

Louie, as you say " This line not part of the name because the previous comment ended in a space, and therefore doesn't continue".

Some time ago had problem with "//-" continuation and did not find the problem until I switched on the function to show spaces, tabs etc. as characters in my editor. There was a space after "//-", "//- " did not work.

Re: code: continuation of a line
llandale - Thu Oct 13 16:32:26 EDT 2011

SystemAdmin - Thu Oct 13 09:45:29 EDT 2011
Louie, as you say " This line not part of the name because the previous comment ended in a space, and therefore doesn't continue".

Some time ago had problem with "//-" continuation and did not find the problem until I switched on the function to show spaces, tabs etc. as characters in my editor. There was a space after "//-", "//- " did not work.

Showing tabs and spaces and new-lines bla bla bla has been a no brainer for me since I first started editors with Word 2.0. "No Brainer" has a double meaning there, I was making so many rediculous errors in all sorts of contexts that I just HAD to show them.

  • Louie

OK, who is going to Wiki to find out how old "Word 2.0" is and then figure out how old I must be... Don't bother, I almost flunked a final because I dropped my program without having barber-pole coded the edges of it; for those of you who understand that reference.