Using content assist

In this section you will learn how to use Safe X3 content assist, an editor feature that makes code writing faster and easier. It consists in showing completion proposals that starts with (or contains) the prefix before carret. Completion shows proposals for:

  1. First, create a new Safe X3 file in a Safe X3 project
  2. Copy and paste the following code to that file using Safe X3 Editor:

    #**
    #* Display a message box !
    #*
    #* @param MESSAGE
    #*!
    Subprog DISPLAY(MESSAGE)
    Value Char MESSAGE
    Infbox MESSAGE
    End

    Subprog TEST()
    # put the carret after Call keyword
    Call
    End

  3. Put the cursor after the Call keyword (after a space) of the TEST subprog and press Ctrl + Space .

    Safe X3 code assist

  4. The first line is selected, now just press Enter and type arguments.

    Safe X3 code assist

    That's it!

Methods call facility

To ease entry of method calls on other script than current one, it is possible to enter the script code, then type a period. This causes display of completion proposals with all methods (Funprog, Subprog and Labels) of the script.

Safe X3 code assist

Once the proposal is selected, the text will be formatted automatically to match the syntax of the language.

Safe X3 code assist


Related concepts

Safe X3 Editor