AMT Help Files

Commenting

Comments can be added in any area of the code editor, including ‘Definitions’. By default comments are coloured green. To add a whole line of comment, begin the line with two slashes. Anything added after these two slashes will be a comment. Comments can also be added at the end of a code line by entering two slashes after the line of code. Again anything added after the two slashes is a comment.

routine display_main
begin_routine
    popup_flag := false
    // disp_form_title := 'Tracking'
    // menu()
    if gn-rsd-delno <> 0
        delivery_no := gn-rsd-delno
        gn-rsd-delno := 0
        rou_fill_form(delivery_no)
    endif
    
    gn_disp_menu()
end_routine

Blocks of comments can be added within curly brackets,’{‘ and ‘}’. The symbol ‘{‘ starts the comment, and the symbol ‘}’ ends the comment block.

routine process_main
begin_routine
    menu ()

    { if button_del_order = 'Y'
    gn-rsd-delno := delivery_no
    if ga-closeform = 'O'
    ga-closeform := ''
    closeform()
    else
    gotoform('delivery')
    endif
    endif }

The double slashes and curly brackets in the example are also used to comment out lines or blocks of code, so that they are not executed.

 

Alerts in comments

Comments can be started with an alert, a specific keyword that is displayed in a noticeable background colour, in order to make the comment stand out.

Alerts come in three categories:

To use an alert in a comment, the keyword has to be the first word in a comment with a single space separating the start of the comment marker or line, and the keyword itself. It is allowed to be prefixed by an at sign (@) and/or postfixed by a colon (:). Keywords are case insensitive.

The following keywords are accepted:

Example:

routine process_main
begin_routine
    menu ()

// @warning: Don't remove this section ...

// @bug The problem is located ...

Note: This routine is needed to ... 

 UnDone Lacks a ... }