Line Comment for AS400/RPG

Line Comment for AS400/RPG

2
NewbieNewbie
2

    Dec 07, 2009#1

    Hi,
    I want to define a regular expression for Line Comment.

    It should be :
    1. If position 7 is a '*' character, then comment all the line;
    2. Whatever shows from position 81, comment all from position 81 to the line end.

    Now I just can make 1. work via:

    Code: Select all

    Line Comment = * Line Comment Valid Columns = [7]
    But I have no ideas for 2. Is there any kindly to help this? Thanks a lot.

    6,603548
    Grand MasterGrand Master
    6,603548

      Dec 07, 2009#2

      The second rule is not really possible because regular expressions are not possible yet (= UE v15.20.0.1022) except for function strings. And for line comments there must be a comment starting string.

      I can only suggest following:

      Line Comment Num = 1  Line Comment Valid Columns = [80] Line Comment Alt = * Line Comment Valid Columns Alt = [7]

      Please note: There are 2 spaces after Line Comment Num = 1.

      With this definition everything after column 80 is highlighted as comment when in column 80 there is a space character. To be 100% correct the space at column 80 is also highlighted as comment which of course you can see only when using a different background color for comments.

      You can also use

      Line Comment Num = 1  Line Comment Valid Columns = [80-4095] Line Comment Alt = * Line Comment Valid Columns Alt = [7]

      to start line comment highlighting with first space found after column 79.
      Best regards from an UC/UE/UES for Windows user from Austria

      2
      NewbieNewbie
      2

        Dec 08, 2009#3

        Thank you. It's totally clear now.