Menu

User Defined Language question - comments

Tom Cloud
2014-10-06
2014-10-07
  • Tom Cloud

    Tom Cloud - 2014-10-06

    How do I define a comment to begin with an asterisk as the first character on a line (and which ends with EOL), but it is an arithmetic multiplication operator anywhere else.

    Is there a way to set the asterisk to be a comment if it's the first character without having it turn arithmetic statements into comments?

     
  • Loreia2

    Loreia2 - 2014-10-07

    Hi Tom,

    just to copy/paste my answer here, so it would be accessible publicly.

    This problem is related to Visual FoxPro. There are thee ways to make a line comment:

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

       * this is a comment
       NOTE this is a comment
    nInt = 4 * 33   && this is a comment and this asterisk implies multiplication
    

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    In order tu support this in UDL 2.X you will have to define two separate line comments: star character and NOTE string should be defined as standard line comments, with "Allow preceding whitespace" option ticked.

    The double ampersand "&&" string should be defined as a Delimiter where double ampersand starts a delimiter and special constant ((EOL)) closes it.
    See example 2, from documentation site: http://udl20.weebly.com/delimiters.html

    Best regards,
    Loreia