Unlike many other programming languages, FileMaker uses the semicolon as a separator between parameters to a function. In many cases this will appear as line endings within code. While FileMaker does not use terminating line endings, it can appear as such. The following guidelines are provided in order to increase the readability and interpretation of FileMaker code.
Line endings with semicolons: Should not include a space when the line of code is considered "complete". This is done in order to provide a "continuation clue" about the code being read. See the following example. Note that line 7 is an If() statement which uses multiple lines. The space after the test parameter of the If () functions indicates that the function has not been "completed" or "closed". Compare this to lines 2-5 where each variable declaration of the Let() function is considered completed.
Let ( [ ~developers = List ( "" ; "" ); ~version = Get ( ApplicationVersion ); ~isGo = PatternCount ( ~version; "Go" ) = True; ~versionNumber = GetAsNumber ( Substitute ( ~version ; "," ; "." ) ); ~extendedPrivileges = If ( ~isGo or ~versionNumber ? 11 ; Evaluate ( "Get ( AccountExtendedPrivileges )" ) ; /*else*/ Evaluate ( "Get ( ExtendedPrivileges )" ) ) ]; PatternCount ( ¶& ~developers &¶ ; ¶& Get ( AccountName ) &¶ ) ? 1 or PatternCount ( ¶& ~extendedPrivileges &¶ ; ¶& "developer" &¶ ) ? 1 or If ( ~isGo or ~versionNumber ? 11 ; Evaluate ( "Get ( AccountPrivilegeSetName )" ) = "[Full Access]" ; /*else*/ Evaluate ( "Get ( PrivilegeSetName )" ) = "[Full Access]" ) )