In SAS, what are good techniques/options for catching syntax errors?

后端 未结 3 1261

In the enhanced editor, the coloring might give you a hint. However, on the mainframe I don\'t believe there is anything, in the editor, that will help you.

I use

3条回答
  •  情深已故
    2021-02-04 11:36

    This advice is language agnostic.

    I would argue that a preferable technique for catching syntax (and logic) errors is to perform a close read (or inspection) of your own code (which should catch the majority of syntax errors), followed by unit tests on small datasets (which will catch any remaining syntax errors, as well as many logic errors if your tests are well-designed).

    I agree there's some worth to syntax checking in isolation, but to read and understand your code thoroughly enough before the first compile so that you know it will compile is a good ideal to strive for. Steve McConnell touches on this idea in Code Complete (see page 827 of the 2nd Edition).

    P.S. You mentioned syntax highlighting in your original post; there are other editors (such as VIM) that will perform syntax highlighting on SAS files.

提交回复
热议问题