1 Reply Latest reply on Jan 29, 2015 1:54 PM by philmodjunk

    Comments?! //



      Comments?! //


      Dear Wizards,
      OK you guys.  I'm looking at script examples and seeing that many of you document comments at the end of a script line (preceeded by a //).  How do you do this?!  I have FMP-13.  Is it something you can only do with Advanced? 


        • 1. Re: Comments?! //

          It's not at the end of a script line, it's at the end of a calculation and entered by typing those characters into the specify calculation dialog:

          Case ( A = B ; 45 ; // Comment where all text to the right of // will be ignored
                     /* comment within a calculation */
                   A = C ; 35 )

          Other FileMaker Comments:

          #This comment is added with the Comment script step in the script editor
          If [ Get ( LastMessageChoice ) = 1 // OK was clicked ]

          You can add a comment to the relationship graph by clicking the A tool and drawing a rectangle on the relationship graph window

          Every field in Manage | Database | fields can be commented as part of the field definitions

          And you can put layout text on a layout--either to the right of the layout edge or with it's Hide Object When property specified as True to put design comments directly on the layout.

          But as I am typing this, it occurs to me that you may be referring to some of the script examples posted here in the forum. Since some of these are simply typed in, we sometimes "cheat" and add a comment to the reader with // that cannot be replicated in an actual FileMaker Script. you just have to leave those out or use the #Comment script line option.