Menu

data/code indentation

Help
2011-10-29
2013-03-18
  • nenad cikic

    nenad cikic - 2011-10-29

    I have found that the java code will not be generated by the c2j if the data/code starts from column 1 as in
    Myr routine
    data
    abc string(5)
    code
       abc='qqs'

    while the following is OK
    Myr routine
    data
    abc string(5)
    code
       abc='qqs'

    Both compiles in clarion 6 i use.

    Nenad

     
  • Andrew Barnham

    Andrew Barnham - 2011-10-30

    Hmm okay.  Clarion 6 must of relaxed indentation rules with respect to 'data' and 'code' reserved words.  Makes sense since I do not think you can use these reserved words as labels anyway.  I recall about 12+ years ago rolling my first CW  2.0 procedure and getting frustrated that it would not compile, and finally figuring that it was because my 'code' block was not indented.

    Easy to fix. In compiler, java class org.jclarion.clarion.compile.grammer.Parser

    Grep for "code" and "data" and make appropriate tweaks so that leading whitespace is optional.

     
  • nenad cikic

    nenad cikic - 2011-10-30

    ok thanks

     

Log in to post a comment.

Auth0 Logo