Skip to content

Indentation if statement

shenhuan2021 edited this page Mar 3, 2024 · 4 revisions

Delphi

  • gfmtopt.BEStyle_IfElseSingleStmtIndentSize, type of integer, default is 2

Java

  • public Integer beStyleIfElseSingleStmtIndentSize, type of integer, default is 2

Uniform

  • Original SQL:
IF (x < 7) THEN
IF (y < 0) THEN
<statements>
END IF;
ELSIF (x > 10) THEN
<statements>
ELSE
<statements>
END IF;
  • Formatted SQL:

Option: fmt133_indent_if_body = 4, type: TFmtInt.

Option: fmt145_indent_elsif_body = 3, type: TFmtInt.

Option: fmt139_indent_else_body = 3, type: TFmtInt.

IF (x < 7) THEN
   IF (y < 0) THEN
      <statements>
   END IF;
ELSIF (x > 10) THEN
   <statements>
ELSE
   <statements>
END IF;

Reference: http://www.dba-oracle.com/t_plsql_indentation_standards.htm

Clone this wiki locally